
- OOAD Tutorial
- OOAD - Home
- OOAD - Object Oriented Paradigm
- OOAD - Object Oriented Model
- OOAD - Object Oriented System
- OOAD - Object Oriented Principles
- OOAD - Object Oriented Analysis
- OOAD - Dynamic Modelling
- OOAD - Functional Modelling
- OOAD - UML Analysis Model
- OOAD - UML Basic Notations
- OOAD - UML Structural Diagrams
- OOAD - UML Behavioural Diagrams
- OOAD - Object Oriented Design
- OOAD - Implementation Strategies
- OOAD - Testing & Quality Assurance
- OOAD Useful Resources
- OOAD - Quick Guide
- OOAD - Useful Resources
OOAD Princhiples Q/A #3
Question:What is the difference between publicly derived inheritance and privately derived inheritance?
Answer:
Sr. No. | Publicly derived inheritance | Privately derived inheritance |
---|---|---|
1 | The public derivation of inheritance means that the derived class can access public and protected members of the base class. | The private derivation of inheritance means that the derived class can access public and protected members of the base class privately. |
2 | The public derivation does not change the access specifiers for inherited members in the derived class. They can be inherited further. | The inherited members become private in the derived class and they can not be inherited further by any other derived class derived from this derived class. |
3 | The protected member of base class will act as a protected member in derived class. | The protected members of a base class will act as a private member in derived class. |
4 | The public member of base class will remain public member in derived class. | The public members of a base class will act as a private member in derived class. |
Advertisements