5 In C++ private inheritance all the members of the base class are inherited as either pri- vate or protected members in the derived class. Does private inheritance create a subtype relation between the base and the derived class? If yes, then explain why. If not, then explain why and also explain what can the programmer do (if anything) to make the derived class a de facto subtype of the base class.

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter11: More Object-oriented Programming Concepts
Section: Chapter Questions
Problem 11RQ
icon
Related questions
Question
5
In C++ private inheritance all the members of the base class are inherited as either pri-
vate or protected members in the derived class. Does private inheritance create a subtype
relation between the base and the derived class? If yes, then explain why. If not, then explain
why and also explain what can the programmer do (if anything) to make the derived class a
de facto subtype of the base class.
Transcribed Image Text:5 In C++ private inheritance all the members of the base class are inherited as either pri- vate or protected members in the derived class. Does private inheritance create a subtype relation between the base and the derived class? If yes, then explain why. If not, then explain why and also explain what can the programmer do (if anything) to make the derived class a de facto subtype of the base class.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr