Any public partD.
Any private part
Inheritance is a way to
add features to existing classes without rewriting them.D.
improve data-hiding and encapsulation.
Suppose you have batch een given the following design, "A person has a name, age, address and sex. You are designing a class to represent a type of person called a patient. This kind of person may be given a diagnosis, have a spouse and may be alive".
Given that the person class has already been created, what of the following would be appropriate to include when you design the patient class?
registration date and diagnosisB.
age and sexC.
sex and diagnosisD.
diagnosis and age
All of the givenD.
None of given
None of givenB.
non-memberD. data member=
Friendship is two way onlyC.
NO Friendship between classesD.
Any kind of friendship
The statement obj A=objB; will cause a compiler error if the objects are of different classes.