Object Oriented Programming (OOP) — Pillars and Advantages: 19 MCQs with answers
All 19 multiple-choice questions from this kit, free and with no sign-up.
Warm-up · 8 questions
Q1. Which statement best describes OOP as a programming paradigm?
BeginnerShow the answer
A · It is based on objects that combine data and methods.
OOP is a paradigm based on the idea of objects, where data and methods are combined with each other, often modelled on real-life entities.
Q2. In procedural programming, how are data and functions arranged?
BeginnerShow the answer
D · Kept separate, with functions emphasized.
Procedural programming keeps data and functions separate and emphasizes functions, unlike OOP which unites them in objects.
Q3. Which of the following is NOT one of the six pillars of OOP named in the source?
BeginnerShow the answer
B · Compilation
The six pillars are Class, Object, Encapsulation, Abstraction, Inheritance, and Polymorphism. Compilation is not one of them.
Q4. A class is best described as which of the following?
BeginnerShow the answer
B · A blueprint describing attributes and behaviours.
A class is the blueprint of the object; it cannot hold data directly and only describes attributes and behaviours.
Q5. A red Toyota Corolla and a blue Honda Civic, both built from the same car design, are examples of which concept?
BeginnerShow the answer
D · Two objects of the class Car
Each car is an instance of the class Car, carrying the class's attributes with its own values — that makes them objects.
Q6. Which access modifiers does encapsulation use to hide internal state?
BeginnerShow the answer
C · Private and protected
Encapsulation uses access modifiers such as private and protected to hide internal state and exposes functionality through public getter/setter methods.
Q7. Which pillar focuses on showing only essential features while hiding complex implementation details?
BeginnerShow the answer
D · Abstraction
Abstraction hides complex implementation details and shows only the essential features, focusing on what an object does rather than how.
Q8. OOP has six pillars: Class, Object, Encapsulation, Abstraction, Inheritance, and Polymorphism.
BeginnerShow the answer
A · True
OOP has six pillars: Class, Object, Encapsulation, Abstraction, Inheritance, and Polymorphism.
Building up · 6 questions
Q9. A driver presses the gas pedal to control speed but never rewires the engine. Which pillar does this illustrate?
IntermediateShow the answer
C · Encapsulation
The engine is hidden data and the pedal is the controlled access method — this is encapsulation, restricting direct access to internals.
Q10. You press a remote's channel button and trust the channel changes without knowing the signals or circuitry. Which pillar does this illustrate?
IntermediateShow the answer
B · Abstraction
The button is the abstraction: it hides complex implementation details and exposes only the essential feature to the user.
Q11. A sports car inherits colour, model, and a start method from the class Car. What relationship does this establish?
IntermediateShow the answer
A · An 'is-a' relationship
Inheritance establishes an 'is-a' relationship — a sports car is a car — while promoting code reusability.
Q12. A dog barks, a cat meows, and a bird chirps — all 'make a sound' differently. Which pillar does this best illustrate?
IntermediateShow the answer
A · Polymorphism
Polymorphism means 'many forms' — the same interface (making a sound) expresses different behaviours across classes.
Q13. A team needs to rewrite how a class stores its data internally without breaking any code that uses the class. Which pillar's advantage makes this possible?
IntermediateShow the answer
B · Encapsulation's maintainability
Encapsulation's maintainability advantage means external code remains unchanged even if the internal structure of the class changes.
Q14. Which pair correctly matches a pillar to the OOP advantage it produces?
IntermediateShow the answer
B · Encapsulation → improved security
Improved security comes from encapsulation, which guards data by restricting direct access. Reusability comes from inheritance and reduced complexity from abstraction.
Topper level · 5 questions
Q15. Assertion (A): Encapsulation and abstraction are the same pillar under different names. Reason (R): Encapsulation hides data using access modifiers, while abstraction hides complexity by exposing only essential features. Which option is correct?
AdvancedShow the answer
D · A is false but R is true.
The assertion is false — they are distinct pillars. The reason is true: encapsulation hides data (a mechanism) while abstraction hides complexity (a design decision).
Q16. A developer makes every field and method of a class private, with no public getters or setters. What is the flaw?
AdvancedShow the answer
A · The class cannot be used — encapsulation means choosing what to expose.
Encapsulation is about choosing what to expose, not hiding everything. A class with no public methods is useless; a class with everything public has no encapsulation.
Q17. A software team is tasked with refactoring a class to improve its internal data structure without affecting any external code that relies on it. Which OOP pillar should they prioritize to ensure this goal is achieved?
AdvancedShow the answer
C · Encapsulation
Encapsulation allows the internal data structure of a class to be changed without impacting external code that interacts with it, thereby ensuring maintainability.
Q18. Consider a scenario where a new class `ElectricCar` is created from an existing class `Car`. This new class modifies the behavior of the `start` method to include battery checks. Which OOP concept is being utilized here, and what advantage does it provide?
AdvancedShow the answer
D · Inheritance; it allows code reuse and extension
Inheritance is utilized here as `ElectricCar` inherits from `Car`, allowing it to reuse and extend the existing functionality while modifying specific behaviors, promoting code reusability.
Q19. A developer is designing a user interface for a remote control that allows users to change channels without knowing the underlying circuitry. This design choice exemplifies which OOP pillar, and what advantage does it offer?
AdvancedShow the answer
C · Abstraction; it hides complex details from the user
Abstraction is exemplified here as it hides the complex implementation details of the remote control's operation, allowing users to interact with a simple interface while benefiting from reduced complexity.
Your notes can be a kit like these
Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free, in 42 languages.
- Chapter notes
- Flashcards
- Practice MCQs
- Scored tests
- Exam prep
Get Veda free See what students get
Free to start · No ads · Works in 42 languages