Homework . how can i write this as java code? thank you


A teacher needs to enter into the system the student name and all the student’s grades. All this information is entered in a single field, first the student name, followed by a comma “ , “, then followed by the list of grades. A comma is used to separate the grades.

The student name is alphabetic characters 2 to 40 characters in length. Each grade is a value between 1 and 10, integer numbers only. The grades are entered in ascending order, so the smaller grades first. A maximum of 6 grades may be entered for each student.


Reading from a file?