Polymorphism: Method Overloading and Overriding
A power cut takes the compound dark and one shout brings three different answers back — that is polymorphism.
What this unit covers
Unit 2: The Four Pillars of Object-Oriented Programming
- 1 Encapsulation and Access ModifiersA locked box with a counter window: private data, and public methods that check everything going in. · 10 min
- 2 Inheritance and Class HierarchiesDoctors, nurses and drivers share name, salary and self-description — inheritance is how you write those parts once. · 10 min
- 3 Polymorphism: Method Overloading and OverridingA power cut takes the compound dark and one shout brings three different answers back — that is polymorphism. · 9 min
- 4 Abstraction: Abstract Classes and InterfacesA good menu tells you what you can order and hides how the kitchen cooks it — learn to design classes the same way. · 17 min