Object-Oriented Programming (OOP): Concepts and Pillars: 25 flashcards
All 25 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 the idea of objects, where data and methods are combined into a single unit.
2. How does procedural programming treat data and functions?
Show the answer
Data and functions remain separated; functions are more emphasised.
3. What does OOP emphasise instead of functions?
Show the answer
Data security and modularisation.
4. Name the six pillars of OOP.
Show the answer
Class, Object, Encapsulation, Abstraction, Inheritance, Polymorphism.
5. What is a class?
Show the answer
The blueprint of an object; it describes attributes and behaviours but cannot hold data directly.
6. What is an object?
Show the answer
An instance of a class, created from the class design, carrying its own attribute values and using class methods.
7. What is encapsulation?
Show the answer
Bundling data and methods into a single unit while restricting direct access using access modifiers like private and protected.
8. How does encapsulation expose functionality?
Show the answer
Through public getter/setter methods.
9. What is abstraction?
Show the answer
Hiding complex implementation details and showing only essential features to the user.
10. What is inheritance?
Show the answer
A mechanism where a derived/child class acquires properties and methods from a base/parent class, promoting code reusability and an 'is-a' relationship.
11. Name the five types of inheritance.
Show the answer
Single, multiple, multilevel, hierarchical, hybrid.
12. What is polymorphism?
Show the answer
Means 'many forms' — expressing various behaviours through the same interface, achieved by method overloading and method overriding.
13. How is polymorphism achieved?
Show the answer
By method overloading and method overriding.
14. What is the 'is-a' relationship in OOP?
Show the answer
The relationship established by inheritance, e.g., a sports car is a car.
15. Give the car example for class vs object.
Show the answer
The design of a car is the class; a red Toyota Corolla and a blue Honda Civic are objects built from it.
16. Give the remote example for abstraction.
Show the answer
Pressing the channel button changes the channel without knowing the signal, connection, or internal circuit — the button is the abstraction.
17. Give the gas pedal example for encapsulation.
Show the answer
The driver presses the gas pedal to control speed but cannot change internal engine parts; the engine is hidden data and the pedal is the access method.
18. Give the animal sound example for polymorphism.
Show the answer
A dog barks, a cat meows, a bird chirps — same task (making sound), different implementations.
19. List three advantages of encapsulation.
Show the answer
Data security, maintainability, flexibility.
20. List three advantages of abstraction.
Show the answer
Reduced complexity, easy maintenance, security.
21. List three advantages of inheritance.
Show the answer
Code reusability, maintainability, hierarchy.
22. List three advantages of polymorphism.
Show the answer
Flexibility, extensibility, readability.
23. What is the key difference between encapsulation and abstraction?
Show the answer
Encapsulation restricts access to data (security); abstraction hides implementation detail behind a simple interface (design).
24. Why is OOP described as efficient in software development?
Show the answer
It enhances code by modularisation and makes it reusable and maintainable.
25. What does a class describe?
Show the answer
The attributes and behaviours of a particular object.
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