+findStudentByRollNo(StringrollNo):Student
getAverageGPA():float
The students have been added:
S02-Thao-5.00
S01-Quang-7.50
S03-Linh-7.50
Add a new student:
Enter rollNo:s04
Enter name:Khang
Enter GPA:8.5
1-Test findStudentByRollNo()
2-Test getAverageGPA()
Enter your choice(1 | 2):1
Enter RollNo:S04
OUTPUT:
S04-Khang-8.50
add a student to the StudentList.
findStudentByRollNo(String rollNo):Student - find a student by rollNo (not case sensitive). If found then return student object,otherwise return null value.
getAverageGPA (): float - return
average of gpa of the students
The program outputs might look something like:
The students have been added:
S02-Thao-5.00
S01-Quang-7.50
S03-Linh-7.50
Add a new student:
Enter rollNo:s04
Enter name:Khang
Enter GPA:8.5
1-Test findStudentByRollNo()
2-Test getAverageGPA()
Enter your choice(1 | 2):1
Enter RollNo:S05
OUTPUT:
N/A
The students have been added:
S02-Thao-5.00
S01-Quang-7.50
S03-Linh-7.50
Add a new student:
Enter rollNo:s04
Enter name:Khang
Enter GPA:8.0
1-Test findStudentByRollNo()
2-Test getAverageGPA()
Enter your choice(1 | 2):2
OUTPUT:7.00
Zoom
Question 4:
+ 90%
Close