Encapsulation protects data, abstraction hides complexity, inheritance reuses code, and polymorphism flexes behavior. Together they make code modular, maintainable, and extensible.
Four pillars (encapsulate, abstract, inherit, polymorph) plus three relationships (association, aggregation, composition) together enable modularity, maintainability, and real-world modeling.
A single class proves all four pillars: private fields (encapsulation), public-hides-private methods (abstraction), overloaded methods (compile-time polymorphism), and implicit extends Object with overridden toString/equals (runtime polymorphism via inheritance).
Encapsulation protects data with private fields and validated methods. Abstraction simplifies usage by hiding how behind what. Encapsulation is about access control; abstraction is about information hiding.