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.
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 TeacherStep 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