Question: Design class Student stored in source code file Student.java. Provide data members for string student identification number ( ex . 1 0 0 0

Design class Student stored in source code file Student.java. Provide data members for string
student identification number (ex."100001"), student name (ex. "Mary Smith"), student major (ex.
"CIS"), and number of credit hours (ex.55). Provide default and parameterized constructor, accessors,
mutators, and toString methods. Include a boolean canGraduate method which returns true if the
student has at least 60 credit hours, else false.
The main application uses an array of Student. Input file
graduates.txt records the number of students in the first line
followed by lines of student data in comma-separated fashion.
a. Read the data from the file into the array. Use exception
handling with a try-catch block to end the program on a file IO
error.
b. Use an interactive loop to ask the user to enter student identifications and number of credit hours
awarded during the summer. Search for the student identification in the array and update the credit
hours. Report an error message if the identification is not found. Use exception handling with a try-
catch block to report an entry error on the integer number of summer credit hours. Hint: Read the credit
hours as a string and use Integer.ParseInt method to convert to an integer. Catch the
NumberFormatException that arises if Integer.ParseInt fails. This loop uses "quit" as the sentinel
value to stop. See sample output.
c. Produce a neatly formatted chart showing graduation status. See sample output.
The following static method in the main application is required. Other methods may be added as
desired.
// return the index of the Student with identification or -1 if not found
public static int searchID (Student [] students, String identification)
 Design class Student stored in source code file Student.java. Provide data

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!