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?

Beginner
A It is based on objects that combine data and methods.
B It avoids real-life modelling entirely.
C It emphasizes functions over all other design units.
D It keeps data and functions in separate modules.
Show 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?

Beginner
A United inside a single object unit.
B Stored only inside parent classes.
C Hidden behind private access modifiers.
D Kept separate, with functions emphasized.
Show 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?

Beginner
A Inheritance
B Compilation
C Polymorphism
D Encapsulation
Show 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?

Beginner
A A method that hides internal complexity.
B A blueprint describing attributes and behaviours.
C A modifier that restricts direct access.
D A live instance holding its own values.
Show 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?

Beginner
A Two types of inheritance
B Two access modifiers
C Two separate classes
D Two objects of the class Car
Show 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?

Beginner
A Single and hybrid
B Final and abstract
C Private and protected
D Public and static
Show 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?

Beginner
A Encapsulation
B Inheritance
C Polymorphism
D Abstraction
Show 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.

Beginner
A True
B False
Show 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?

Intermediate
A Inheritance
B Abstraction
C Encapsulation
D Polymorphism
Show 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?

Intermediate
A Encapsulation
B Abstraction
C Polymorphism
D Inheritance
Show 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?

Intermediate
A An 'is-a' relationship
B A 'has-a' relationship
C A 'part-of' relationship
D A 'uses-a' relationship
Show 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?

Intermediate
A Polymorphism
B Encapsulation
C Abstraction
D Inheritance
Show 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?

Intermediate
A Abstraction's readability
B Encapsulation's maintainability
C Polymorphism's extensibility
D Inheritance's hierarchy
Show 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?

Intermediate
A Polymorphism → modular design
B Encapsulation → improved security
C Abstraction → code reusability
D Inheritance → improved data security
Show 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?

Advanced
A A is false and R is false.
B A is true but R does not explain A.
C A is true and R explains A.
D A is false but R is true.
Show 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?

Advanced
A The class cannot be used — encapsulation means choosing what to expose.
B The class now has no encapsulation at all.
C The class has inherited from too many parents.
D The class has become polymorphic by mistake.
Show 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?

Advanced
A Abstraction
B Polymorphism
C Encapsulation
D Inheritance
Show 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?

Advanced
A Abstraction; it simplifies the interface for users
B Polymorphism; it allows different behaviors for the same method
C Encapsulation; it secures the battery data
D Inheritance; it allows code reuse and extension
Show 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?

Advanced
A Polymorphism; it enables different devices to respond differently
B Encapsulation; it protects the internal workings
C Abstraction; it hides complex details from the user
D Inheritance; it allows for shared functionality
Show 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.

Make your own

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