Introduction / Context:
Object-oriented programming (OOP) organizes code into classes related by inheritance. Familiarity with the vocabulary—base class, derived class, parent class, child class, superclass, subclass—helps you read documentation and design hierarchies accurately across languages like C++, Java, and Python.
Given Data / Assumptions:
- We are discussing single or multiple inheritance in C++.
- The term 'base class' denotes the class whose members are inherited.
- We must pick the common synonym for 'base class.'
Concept / Approach:
- In many texts, 'base class' ≈ 'parent class' ≈ 'superclass' (C++ commonly says base; Java often says superclass).
- Conversely, 'derived class' ≈ 'child class' ≈ 'subclass'—these inherit from the base.
Step-by-Step Reasoning:
Map terms: base ↔ parent/superclass; derived ↔ child/subclass.Select the synonym that matches 'base class': 'parent class'.Eliminate terms that actually refer to the inheriting class.
Verification / Alternative check:
Check standard C++ literature: a derived class lists its base classes in its declaration (class B : public A {}), where A is the base/parent.
Why Other Options Are Wrong:
- child class / subclass / derived class: These refer to the inheriting class, not the class being inherited from.
- None of the above: Incorrect because 'parent class' is the accepted synonym.
Common Pitfalls:
- Interchanging subclass/superclass terminology and reversing the relationship.
- Forgetting access specifiers (public/protected/private) affect inheritance visibility but not the naming.
Final Answer:
parent class
Discussion & Comments