Answered step by step
Verified Expert Solution
Link Copied!

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

1. State whether each of the following is true or false. If false, explain why.
(1) Base-class constructors are not inherited by derived classes.
(2) An is-a relationship is implemented via composition.
(3) A Student class has an is-a relationship with the Faculty and Course classes.
(4) Private members of a private base class are inaccessible to the derived class.
(5) A base classs protected members can be accessed in the base-class definition, in derived-class definitions and in friends of the base class and its derived classes.
2.
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 (i.e., 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Database Programming

Authors: Chris Fehily

1st Edition

1937842312, 978-1937842314

More Books

Students also viewed these Databases questions

Question

What is the relationship between humans and nature?

Answered: 1 week ago