4. Inheritance #

Created Thursday 25 March 2021

  1. Inheritance - Simple.
    • Suppose we are making a MOBA. Our players can be a Wizard, Healer, etc.
    • How to handle object creation, and then allot them their type.

Approach - Make a Player class, having a function with a switch(type_input) which creates the required object, and also adds Player properties to it.

Note: