Podcast
Questions and Answers
Which of the following is NOT inherited by a child object in object-oriented programming?
Which of the following is NOT inherited by a child object in object-oriented programming?
- Overloaded operators
- Friend functions (correct)
- Destructors
- Constructors
What is the purpose of inheritance in object-oriented programming?
What is the purpose of inheritance in object-oriented programming?
- To override the properties of a parent object
- To create new classes from existing ones (correct)
- To remove code duplication
- To restrict access to certain methods
Which type of inheritance is defined as basing an object or class upon another object or class?
Which type of inheritance is defined as basing an object or class upon another object or class?
- Hierarchical inheritance
- Multiple inheritance
- Class-based inheritance (correct)
- Prototype-based inheritance
What does inheritance allow programmers to do?
What does inheritance allow programmers to do?
Which of the following is NOT inherited by a child object in most class-based object-oriented languages like C++?
Which of the following is NOT inherited by a child object in most class-based object-oriented languages like C++?