8bitzz / blogs

0 stars 0 forks source link

Interview Question (Part I: Object Oriented Programming) #24

Closed 8bitzz closed 3 years ago

8bitzz commented 3 years ago

What is OOP? Why should we use OOP?

Encapsulation? Polymorphism?

(Interface) Given a game where we have set of animals of difference races (Example: Dog, Bird, Cat, Lion). How to make all of the animal in the set expose a method named “fly” so we can ask them to fly even if they are not birds?

What is composition? Compare composition vs inheritance.

Explain class constructor

Tell the differences between Interface and Abstract class. Give some examples of each

Tell the differences between Override and Overload