Object Oriented Programming (OOP) — Pillars and Advantages: 26 flashcards
All 26 flashcards from this kit, free and with no sign-up.
1. What is Object-Oriented Programming (OOP)?
Show the answer
A programming paradigm based on objects that combine data and methods, modeled on real-life entities like cars, humans, and books.
2. How does procedural programming differ from OOP?
Show the answer
Procedural programming keeps data and functions separate and emphasizes functions; OOP unites data and functions inside an object and emphasizes data security and modularization.
3. Name the six pillars of OOP.
Show the answer
Class, Object, Encapsulation, Abstraction, Inheritance, and Polymorphism.
4. What is a class?
Show the answer
The blueprint of an object. It cannot hold data directly; it describes the attributes and behaviours that its objects will have.
5. What is an object?
Show the answer
An instance of a class. It carries the class's attributes with its own values and uses the class's methods.
6. Give the source's example distinguishing a class from an object.
Show the answer
A car design is the class; a red Toyota Corolla and a blue Honda Civic built from that design are objects.
7. What is encapsulation?
Show the answer
Bundling data (variables) and methods (functions) into a single unit such as a class, while restricting direct access to some components using access modifiers like private and protected.
8. How does encapsulation expose functionality?
Show the answer
Through public getter/setter methods, which ensure data integrity and enhanced security.
9. State the three advantages of encapsulation.
Show the answer
Data security, maintainability, and flexibility.
10. What is abstraction?
Show the answer
Hiding complex implementation details and showing only the essential features or functionalities to the user — focusing on what an object does rather than how it does it.
11. State the three advantages of abstraction.
Show the answer
Reduced complexity, easy maintenance, and security.
12. What is inheritance?
Show the answer
A mechanism where a new derived/child class acquires properties and methods from an existing base/parent class, promoting code reusability and establishing an 'is-a' relationship.
13. List the five types of inheritance named in the source.
Show the answer
Single, multiple, multilevel, hierarchical, and hybrid inheritance.
14. What is polymorphism?
Show the answer
It means 'many forms' — using the same interface to express various forms or behaviours. It is achieved through method overloading and method overriding.
15. State the three advantages of polymorphism.
Show the answer
Flexibility, extensibility, and readability.
16. What is the key difference between encapsulation and abstraction?
Show the answer
Encapsulation hides data (a mechanism using access modifiers and getters/setters); abstraction hides complexity (a design decision exposing only what matters).
17. How does the source's car example illustrate encapsulation?
Show the answer
The driver presses the gas pedal to control speed but never rewires the internal engine — the engine is hidden data and the pedal is the controlled access method.
18. How does the source's remote example illustrate abstraction?
Show the answer
You press the channel-change button and trust the channel changes, without knowing the signals or internal TV circuitry — the button is the abstraction.
19. How does the source's animal example illustrate polymorphism?
Show the answer
Making a sound is one job, but a dog barks, a cat meows, and a bird chirps — same action, different implementations.
20. List the six advantages of OOP named in the source.
Show the answer
Modular design, code reusability, easier maintenance, scalability, improved security, and reduced complexity.
21. Which pillar gives OOP its code reusability advantage?
Show the answer
Inheritance — once-written code can be reused many times.
22. Which pillar gives OOP its improved security advantage?
Show the answer
Encapsulation — data is secured by restricting direct access.
23. Which pillar gives OOP its reduced complexity advantage?
Show the answer
Abstraction — programmers hide unnecessary details from users.
24. Which pillar keeps external code unchanged when a class's internal structure changes?
Show the answer
Encapsulation — its maintainability advantage means external code stays unchanged even if internals change.
25. What relationship does inheritance establish between classes?
Show the answer
An 'is-a' relationship — for example, a sports car is a car.
26. What are the two mechanisms that achieve polymorphism?
Show the answer
Method overloading and method overriding.
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