Objects


Features of Object Oriented Programming:

  1. Abstraction.
  2. Subtyping.
  3. Dynamic Lookup.
  4. Inheritance.

Abstraction

<aside> πŸ’‘ Main idea: Display only useful details and hiding unnecessary ones.

</aside>


Subtyping

<aside> πŸ’‘ Idea is to have a queue that can hold objects of different types. Subtyping is the way to achieve this.

</aside>

If f() is a method of B and A is a subtype of B , every object of A also supports f() Note: Implementation of f() can be different in A.