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 One Unit
Data and functions finally live together.
OOP is a programming paradigm built on objects — units that combine data and methods. This is its defining shift from procedural programming.
↳ OOP's core idea: data and the methods that act on it live together inside an object.
📖 Definition
The Six Pillars of OOP
Six pillars hold up every OOP program.
↳ Memorize all six pillars — exams frequently ask you to list and define them.
📖 Definition
Class vs Object: Design vs Reality
A blueprint is not a building.
↳ Class = design; Object = the actual thing built from that design.
💡 Key Idea
Encapsulation: Bundle and Protect
Wrap data, guard the doors.
Encapsulation bundles data and methods into a single unit (like a class) and restricts direct access using access modifiers (private, protected), exposing functionality only through public getter/setter methods.
↳ Encapsulation = bundling + controlled access, giving security and flexibility.
🔗 Analogy
The Car Pedal Analogy for Encapsulation
You press the pedal, not the engine.
↳ Encapsulation = engine hidden, pedal exposed.
💡 Key Idea
Abstraction: Show What, Hide How
What it does matters, not how.
Abstraction hides complex implementation details and shows only essential features — letting developers focus on what an object does, not how it does it.
↳ Abstraction simplifies the outside world by hiding the messy inside.
✏️ Example
The TV Remote: Abstraction in Action
Press a button, channel changes — magic.
↳ Abstraction = the button you press, not the circuit behind it.
💡 Key Idea
Inheritance: Reuse Through 'Is-A'
Child classes inherit parent powers.
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 = child class inherits parent's properties and methods.
⭐ Important Fact
Five Types of Inheritance
Five flavours of inheritance exist.
↳ Know all five inheritance types — a common exam question.
✏️ Example
Car and Sports Car: Inheritance Example
Sports car IS-A car.
↳ Child classes inherit shared traits from the parent — no rewriting.
💡 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 = one interface, many behaviours, achieved via overloading and overriding.
🔗 Analogy
Animal Sounds: Polymorphism Analogy
Same job, different sounds.
↳ Same action name, different behaviour per object — that's polymorphism.
⚖️ Comparison
Encapsulation vs Abstraction
Two pillars, easily confused.
↳ Encapsulation protects data; abstraction hides complexity — related but distinct.
⚠️ Common Mistake
Don't Confuse a Class With an Object
A blueprint is not the building.
↳ Class = blueprint; Object = instance that actually holds data.
⭐ Important Fact
Six Advantages of OOP
Why OOP wins in real projects.
↳ OOP's advantages: modular, reusable, maintainable, scalable, secure, less complex.
🎯 Exam Tip
Exam Pattern: Pillars + Advantages
Two questions almost always appear.
↳ Pillars, advantages, and procedural-vs-OOP comparisons are the highest-yield exam areas.
🧠 Memory Trick
Remember the Six Pillars: CO-EAIP
Six pillars, one acronym.
Use CO-EAIP: Class, Object, Encapsulation, Abstraction, Inheritance, Polymorphism.
↳ CO-EAIP = all six pillars, in order.