/**
* Student.java
*/
public class Student extends Person {
protected int age;
protected double gpa;
public Student()
{
this("",0,0);
}
public Student(String name, int age, double gpa)
{
super(name); // must be
first in constructor
this.age = age;
this.gpa = gpa;
}
public String toString() // overrides parent
{
return super.toString() + " Age:
" + age
+ " GPA: " +
gpa + "\n";
}
}
/*
Constructor called by this, NOT Student
Student.java:11: cannot resolve symbol
symbol : method Student (java.lang.String,int,int)
location: class Student
Student("",0,0);
^
*/