• 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, student 2: Name and GPA for 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 student 5: 20125555 Lana 3.8 Enter the ID, Name and GPA for Lowest GPA: 3.4 Highest GPA: 3.8 Average GPA: 3.6 Press any key to continue

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter13: File Input And Output
Section: Chapter Questions
Problem 10PE
icon
Related questions
Question
100%

]]

●
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
Transcribed Image Text:● 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
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
File Input and Output Operations
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.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning