Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
public static void main()
{
Students gvsu = new Students();
gvsu.openFile();
System.out.println( "Course Roster" );
gvsu.printRoster();
System.out.println( "\r\nThe highest GPA is: ");
System.out.println( gvsu.findHighestGrade());
ArrayList<Student> p = gvsu.probationList();
System.out.println( "\r\nThe Probation List (GPA < 2.0) " + p.size() + " students.");
for (Student s:p)
{
System.out.println( s.toString() );
}
}
Input:
Scott,Grissom,123,4.0
Roger,Ferguson,124,2.8
Teresa,Peterman,101,3.7
Derp,Derpson,102,3.9
Derpina,Derpy,103,2.4
Derpey,Derpson,104,1.2
Ben,Dover,101,1.1
Seymour,Butts,103,.52
Output:
Course Roster
Grissom Scott (123) 4.0
Ferguson Roger (124) 2.8
Peterman Teresa (101) 3.7
Derpson Derp (102) 3.9
Derpy Derpina (103) 2.4
Derpson Derpey (104) 1.2
Dover Ben (101) 1.1
Butts Seymour (103) 0.52
The highest GPA is:
Grissom Scott (123) 4.0
The Probation List (GPA < 2.0) 3 students.
Derpson Derpey (104) 1.2
Dover Ben (101) 1.1
Butts Seymour (103) 0.52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment