public class Student { private String name; private int averageGrade; public Student(String name, int averageGrade) { this.name = name; this.averageGrade = averageGrade; } @Override public String toString() { return "Nume student: " + name + "\nMedia studentului: " + averageGrade; } }