Answered step by step
Verified Expert Solution
Question
1 Approved Answer
1 . State whether each of the following is true or false. If false, explain why. ( 1 ) Base - class constructors are not
State whether each of the following is true or false. If false, explain why.
Baseclass constructors are not inherited by derived classes.
An isa relationship is implemented via composition.
A Student class has an isa relationship with the Faculty and Course classes.
Private members of a private base class are inaccessible to the derived class.
A base classs protected members can be accessed in the baseclass definition, in derivedclass definitions and in friends of the base class and its derived classes.
Draw an inheritance hierarchy for students at a university. Use Student as the base class of the hierarchy, then include classes UndergraduateStudent and GraduateStudent that derive from Student. Continue to extend the hierarchy as deep ie as many levels as possible. For example, Freshman, Sophomore, Junior and Senior derive from UndergraduateStudent, and DoctoralStudent and MasterStudent derive from GraduateStudent. After drawing the hierarchy, discuss the relationships that exist between the classes. Note: You dont need to write any code for this exercise.
Step 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