Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started