Take out a piece of paper. We’ll be programming on paper.
Create a Student class that is a subclass of Person. The Student has two additional instance variables:
studentId an eight digit number.
gradeLevel a String
The instance variables must be private. This means you need accessor methods. Be sure the Student’s constructor initializes the Student’s name.
public class Person {
private String name;
public Person(String name) {
this.name = name;
}
public String getName() {
return name;
}
}
Write a subclass of Student named StudentAthlete. StudentAthlete has a private instance variable team of type String. Write three constructors for StudentAthlete. One with four parameters, one with three parameters and one with just one parameter.