Object Oriented Programming MCQs with Answers
Practice important Object Oriented Programming MCQs with answers and explanations.
Multiple Choice Questions
Q61: The principle of abstraction focuses on capturing only those details about an object that are _______ to the current perspective.
- A: relevant
- B: irrelevant
- C: complex
- D: detailed
View Answer
A
Q62: The concept of generalization in object-oriented models reduces _______ and increases _______.
- A: complexity; reusability
- B: redundancy; maintainability
- C: abstraction; inheritance
- D: behavior; flexibility
View Answer
B
Q63: A class that extends the behavior of another class by adding new attributes is an example of _______.
- A: specialization
- B: extension
- C: sub-typing
- D: restriction
View Answer
B
Q64: In OO models, "Person" is an example of a(n) _______ class, while "Student" and "Teacher" are examples of _______ classes.
- A: abstract; concrete
- B: concrete; abstract
- C: abstract; derived
- D: derived; concrete
View Answer
A
Q65: Sub-typing allows a derived class to _______ the base class but also include additional characteristics.
- A: override
- B: ignore
- C: replace
- D: extend
View Answer
D
Q66: Which of the following statements about concrete classes is true?
- A: They implement a concept and provide specific details for objects
- B: They are used to generalize behavior and cannot be instantiated
- C: They exist only at the top of the class hierarchy
- D: They are often used to represent abstract concepts
View Answer
A
Q67: Specialization is used to _______ the general behavior of a class to fit specific needs.
- A: extend
- B: restrict
- C: ignore
- D: add
View Answer
D
Q68: Which of the following is NOT a benefit of inheritance?
- A: Reuse
- B: Redundancy
- C: Reduced code complexity
- D: Improved maintainability
View Answer
B
Q69: Abstract classes are typically placed _______ in a class hierarchy.
- A: at the top
- B: below concrete classes
- C: intermediate
- D: level-specific
View Answer
A
Q70: In the example of shapes, the Circle, Line, and Triangle are all _______ classes derived from the _______ class.
- A: concrete; Shape
- B: abstract; Shape
- C: concrete; Geometric
- D: abstract; Geometric
View Answer
A