Question: Teacher class This class extends the Person class. It also has an additional instance variable and its accessor method: String specialty and public String getSpecialty
Teacher class
This class extends the Person class. It also has an additional instance variable and its accessor method: String specialty and public String getSpecialty
public Teacher Date born, Name name, String specialty: this constructor throws IllegalPersonException exceptions if born or name is null. Also, it throws an IllegalPersonException exception if specialty is blank note: null is ok
COMP Assignment of Due Before Lesson
This class overrides the public String toString method, which returns a String in one of these two exact formats:
a Alive people example: "Tiger Woods specialty: mathematics was born and is still alive"
b Dead people example: "Albert Einstein specialty: mathematics was born and died
Use the parent's getName return value, then its getPrettyName method, and the borndied getYyyyMmDd method.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
