American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

4:30 PM – Python OOP – Gamas

May 3, 2022 @ 4:30 pm - 5:30 pm

Today We Do
  1. We learned about Car and ElectricCar class inheritance.
  2. We learned about Monster and Dragon class inheritance.
Homework
  1. Inside Dragon class, override sword_damage method. Inside this method, it will not do any damage to the dragon. And it will say “Dragon is immune to sword attack. No damage is done” . Look at how we override fill_up_gas_tank in ElectricCar class for an example.
  2. Create a Troll class, make it inherits from Monster class. And then override sword_damage method. Inside this method, it will do half damage to the Troll. And it will say “Troll is resistance to sword attack. Damage is halved” .
  3. Review how we use dictionary inside MonsterInheritance class and ask question next week.

Details

Date:
May 3, 2022
Time:
4:30 pm - 5:30 pm
Event Categories:
,
Verified by MonsterInsights