Question: I need little help with above 2 questions for java programing. With complete explanations! Assume we have 4 classes: 1. Person 2. Teacher 3. Student
Assume we have 4 classes: 1. Person 2. Teacher 3. Student 4. PhD Student Teacher and Student are both subclasses of Person. PhD Student is a subclass of Student. 1. Draw a class inheritance tree using your favorite drawing program or a piece of paper and a pen. You will need to explain. 2. Which of the following assignments are legal, and why or why not? Write down your explanations. a) Person pl = new Student(); b) PhDStudent phdi = new Student()
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
