This commit is contained in:
2024-12-03 14:48:13 +03:00
parent 95ebce05ed
commit fe3c8fb4d4
6 changed files with 174 additions and 0 deletions

24
labs/lab4/Grades.java Normal file
View File

@ -0,0 +1,24 @@
// ****************************************************************
// Grades.java
//
// Use Student class to get test grades for two students
// and compute averages
//
// ****************************************************************
public class Grades
{
public static void main(String[] args)
{
Student student1 = new Student("Mary");
//create student2, "Mike"
Student student2 = new Student("Mike");
//input grades for Mary
student1.inputGrades();
//print average for Mary
System.out.println(student1.getAverage());
//input grades for Mike
student2.inputGrades();
//print average for Mike
System.out.println(student2.getAverage());
}
}