← Object-Oriented Programming learning pathObject-Oriented Programming · Module 4 of 10
Abstraction
Show only essential features and hide complexity.
📖 Key ideas
- Abstraction exposes what an object does, not how.
- Abstract classes cannot be instantiated and may have abstract methods.
- Interfaces define method contracts.
- Users of a class rely on its public interface.
- Reduces complexity for callers.
💡 Real-life example: Abstraction is driving a car: you use the steering and pedals without knowing engine details.
AbstractionHiding implementation details
Abstract classClass that cannot be instantiated directly
InterfaceContract of methods
Abstract methodMethod without a body