Veda Bites are swipeable micro-lessons — each one teaches exactly one
idea. The bites below come from this kit — swipe through them in the app.
💡 Key Idea
OOP Bundles Data and Methods Into Objects
Data and functions — finally united.
OOP is a programming paradigm built on objects — units that combine data and methods together, modeled on real-life things like cars, humans, and books.
↳ OOP's core shift is uniting data and methods into a single object unit — the foundation of its security and modularity.
📖 Definition
The Six Pillars of OOP
Six pillars hold up every OOP program.
↳ Class, object, encapsulation, abstraction, inheritance, and polymorphism are the six pillars every OOP concept rests on.
💡 Key Idea
Class vs Object: Design vs Reality
A design is not the car itself.
↳ A class is the design; an object is a real thing built from it, with its own attribute values.
💡 Key Idea
Encapsulation: Bundle and Protect
Bundle the data, guard the doors.
Encapsulation bundles data and methods into one unit (a class) and restricts direct access using access modifiers like private and protected, exposing functionality through public getter/setter methods.
↳ Encapsulation = bundling + restricted access, ensuring data integrity and security.
⭐ Important Fact
Three Advantages of Encapsulation
Security, stability, flexibility — all from one pillar.
↳ Encapsulation delivers security, maintainability, and flexibility in one stroke.
💡 Key Idea
Abstraction: Show What, Hide How
Press the button — don't trace the circuit.
Abstraction hides complex implementation details and shows only essential features, so developers focus on what an object does, not how it does it.
↳ Abstraction simplifies usage by exposing only the essential interface.
⚖️ Comparison
Encapsulation vs Abstraction — Don't Mix Them Up
Two pillars, two different jobs.
↳ Encapsulation protects data; abstraction hides complexity — related but distinct pillars.
💡 Key Idea
Inheritance: Reuse Through 'Is-A'
Child classes inherit the family traits.
Inheritance lets a new class (derived/child) acquire properties and methods from an existing class (base/parent), promoting code reusability and establishing 'is-a' relationships.
↳ Inheritance reuses parent code and models 'is-a' relationships between classes.
⭐ Important Fact
Five Types of Inheritance
Five shapes of parent-child chains.
↳ Inheritance comes in five structural forms: single, multiple, multilevel, hierarchical, and hybrid.
💡 Key Idea
Polymorphism: Many Forms, One Interface
Same call, different behaviours.
Polymorphism means 'many forms' — expressing various behaviours through the same interface. It is achieved via method overloading and method overriding.
↳ Polymorphism lets one interface express many behaviours via overloading and overriding.
⭐ Important Fact
Advantages of Polymorphism
Flexible, extensible, readable code.
↳ Polymorphism boosts flexibility, extensibility, and readability.
⭐ Important Fact
Six Advantages of OOP
Six reasons OOP dominates software.
↳ OOP's advantages — modularity, reuse, maintainability, scalability, security, and simplicity — all trace back to its pillars.
⚠️ Common Mistake
Class Is Not an Object
Don't confuse the blueprint with the building.
↳ A class describes; an object holds data. Never confuse the two.
⚠️ Common Mistake
Encapsulation ≠ Abstraction
Two pillars, often swapped by mistake.
↳ Encapsulation = data protection; abstraction = complexity hiding. Keep them separate.
🎯 Exam Tip
Exam Framing: Pillars + Advantages
Two lists win most OOP questions.
↳ Pillars + definitions + examples + advantages cover most OOP exam questions.
🧠 Memory Trick
Remember the Six Pillars
One acronym locks in all six.
Use 'CO-EAIP' — Class, Object, Encapsulation, Abstraction, Inheritance, Polymorphism — to recall all six pillars in order.
↳ CO-EAIP keeps the six pillars in order for quick recall.