Create a sequential file Students.txt and open it for output. Allow the user to input the ID(integer), Name(string) and GPA(double) until ctrl-z is pressed and make sure store them inside the file Students.txt separated by a space. Read from the file the five GPA values and find the lowest and highest values. Calculate the average GPA. • Store the lowest, highest and average GPA inside another binary file Results.txt • Close Results.txt then open it to read and display the results on the screen. The following is a sample output for the program: Enter the ID, Name and GPA for student 1: 20121111 John 3.5 Enter the ID, Name and GPA for student 2: 20122222 Jane 3.7 Enter the ID, Name and GPA for student 3: 20123333 Alex 3.6 Enter the ID, Name and GPA for student 4: 20124444 Kara 3.4 Enter the ID, Name and GPA for student 5: 20125555 Lana 3.8 Lowest GPA: 3.4 Highest GPA: 3.8 Average GPA: 3.6 Press any key to continue I
Create a sequential file Students.txt and open it for output. Allow the user to input the ID(integer), Name(string) and GPA(double) until ctrl-z is pressed and make sure store them inside the file Students.txt separated by a space. Read from the file the five GPA values and find the lowest and highest values. Calculate the average GPA. • Store the lowest, highest and average GPA inside another binary file Results.txt • Close Results.txt then open it to read and display the results on the screen. The following is a sample output for the program: Enter the ID, Name and GPA for student 1: 20121111 John 3.5 Enter the ID, Name and GPA for student 2: 20122222 Jane 3.7 Enter the ID, Name and GPA for student 3: 20123333 Alex 3.6 Enter the ID, Name and GPA for student 4: 20124444 Kara 3.4 Enter the ID, Name and GPA for student 5: 20125555 Lana 3.8 Lowest GPA: 3.4 Highest GPA: 3.8 Average GPA: 3.6 Press any key to continue I
Chapter13: File Input And Output
Section: Chapter Questions
Problem 10PE
Related questions
Question
[[
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning