Question: Write a program to create a data file for storing student records. Assume a student record consists of the following fields: ID , Last Name,

Write a program to create a data file for storing student records. Assume a student
record consists of the following fields: ID, Last Name, First Name, and Marks. The
Marks field contains a number between 0 and 100. Write a program that loops to get
data for multiple students from the user and stores those as records in the student.txt
file. The user should enter a negative number as the ID to signal the end of the loop.
Your program should be able to reject non-numeric and out of range marks.
Additionally, handle all file related exceptions.

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 Programming Questions!