package Lect34Inheritance4; public class Student { private static final double DEFAULT_GPA = 0.0; private String name; private double gpa; public Student() { this("NONAME", DEFAULT_GPA); int a = 3; } public Student(String theName) { this(theName, DEFAULT_GPA); } public Student(String theName, double theGpa) { name = theName; gpa = theGpa; } public void setName(String theName) { name = theName; } public String getName() { return name; } public void setGPA(double theGPA) { gpa = theGPA; } public double getGPA() { return gpa; } public void printRecord() { System.out.print("[Name: " + name + ", "); System.out.println("GPA: " + gpa + "]"); } public static void main(String[] args) { Student student1 = new Student("John"); Student student2 = new Student("Rose", 3.9); Student student3 = new Student(); student1.printRecord(); student2.printRecord(); student3.printRecord(); } }