
package person;

public class Student extends Person {
    
    private double gpa;
    
    Student(String name, int age, String address, String phone, double gpa){
        super(name,age,address,phone);      /* use super and parameters to call a superclass constructor */
        this.gpa = gpa;
    }
    public String toString(){
        return super.toString()+" "+gpa;    /* Use super to call a method in the superclass */
    }
    public double getGpa() {
        return gpa;
    }
    public void setGpa(double gpa) {
        this.gpa = gpa;
    }
    public static void main(String[] args) {
        Person s = new Student("Matt",28,"123 St.","1234567",4.0);
        System.out.println(s);
    }
}
