Question: Write an application which will write five student ID numbers and GPAs to a rw file called Stu.dat and then allow you to display the

Write an application which will write five student ID numbers and GPAs to a rw file called Stu.dat and then allow you to display the GPA of any student upon entering their ID number, for any number of students. Directions Import the classes necessary to support your application. Create a class called ReadWrite. This class has no properties or behaviors. Create a main method which will include the following: o Add an appropriate throws statement in the main method. o Create a reference to a text file called Stu.dat with rw access. o Include try and catch blocks for exception handling. o Use a loop to interactively assign student ID numbers and their GPA scores. o With the use of a second loop, display the GPA for specific student ID numbers. o Use a sentinel to determine when you wish to stop the program. o Include a finally block within your program. Note: User defined methods are not required but may be used if you prefer.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!