Question: QUESTION 7 (a) The Object class is said to be the base class of all classes. Explain what this means. Name any two methods that

 QUESTION 7 (a) The Object class is said to be the

QUESTION 7 (a) The Object class is said to be the base class of all classes. Explain what this means. Name any two methods that are inherited from the Object class. (4 marks) (b) Given is the class Person defined below. A Patient is a person with the addition attributes of patient ID \& Blood type. Write a class to encapsulate a Patient. You must also override the toString method in the Person class. public class Person \{ private String name, phoneNum; public Person(String n, String p){ \} name =n; phoneNum =p; public String getName 0{ return name; } public String getPhone 0 \{return phoneNum; } 3 public String toString 0 \{return name + phoneNum;\} (6 marks) Total (10 marks)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!