American Young Coder (AYC)

AYC logo
Loading Events

« All Events

  • This event has passed.

6 PM – Python OOP – Bill

November 5, 2022 @ 6:00 pm - 7:00 pm

Today We:
  1. Reviewed class inheritance
  2. Went over method overriding
Your HW:
  1. Create a new file in the MonsterInheritence src folder called Nov_5_InheritenceHW.py
  2. Create a vehicle class
    1. attributes: color, speed, capacity
    2. methods: get_info: returns information about the vehicle; drive: prints out “<color> vehicle drives at <speed> mph”
  3. Create a Car class
    1. Make it inherit from vehicle
    2. attributes: brand
      1. You will need to make color, speed, and capacity parameters in the __init__
    3. Override the drive method to print out “<color> <brand> car drives at <speed> mph”

Details

Date:
November 5, 2022
Time:
6:00 pm - 7:00 pm
Verified by MonsterInsights