Question: Q3: Can a derived class (i.e., Subclass) directly invoke a private method of the base class (i.e., Super class)? Explain your Answer. Q4: Draw an

Q3:

Can a derived class (i.e., Subclass) directly invoke a private method of the base class (i.e., Super class)? Explain your Answer.

Q4:

Draw an Inheritance hierarchy for students at a university similar to the hierarchy as shown in the Figure below.

Q3: Can a derived class (i.e., Subclass) directly invoke a private method

Figure: Inheritance hierarchy for university CommunityMember

Use Student as the superclass of the hierarchy, then extend Student with classes UndergraduateStudent and GraduateStudent. Continue to extend the hierarchy as deep (i.e., as many levels) as possible. For example, Freshman, Sophomore, Junior and Senior might extend UndergraduateStudent. DoctoralStudent and MastersStudent might be subclasses of GraduateStudent. After drawing the hierarchy, discuss the relationships that exist between the classes.

[Note: You do not need to write any code for this question]

Community Member Employee Student Alumnus Faculty Staff Administrator Teacher

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!