Suppose Person also has a no‑argument constructor that sets…
Suppose Person also has a no‑argument constructor that sets name = “Unknown”. Write a Student no‑arg constructor that:· Calls the no‑arg superclass constructor.· Sets gpa to 0.0. public class Person { private String name; public Person() { this.name = “Unknown”; } public Person(String name) { this.name = name; } public String getName() { return name; }}public class Student extends Person { private double gpa; public Student(String name, double gpa) { super(name); this.gpa = gpa; } public double getGpa() { return gpa; }}
Read Details