-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.java
More file actions
19 lines (15 loc) · 716 Bytes
/
Main.java
File metadata and controls
19 lines (15 loc) · 716 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
package Java_Project_Package.StudentGrading;
import Design_Pattern.Practice_problems.OOP_Problems.Level2Solutions.Level2Solutions;
import Design_Pattern.Practice_problems.OOP_Problems.Level2Solutions.Grade;
public class Main {
public static void main(String[] args) {
int[] grades = {85, 90, 78, 92, 88};
Student student = new Student("Alice", grades);
GradeCalculator calculator = new GradeCalculator();
double average = student.getAverageGrade();
char letter = calculator.calculateLetter(average);
System.out.println("Student: " + student.getName());
System.out.println("Average: " + average);
System.out.println("Grade: " + letter);
}
}