View Code? Open in Web Editor
NEW
This project forked from tuwaiq-python-4/classes
classes's Introduction
define a Vehicle class . it has the following structure :
- brand
- name
- color
- capacity
- plate_number
- drive()
prints "the vehicle_name is driving!"
- drift()
prints "the vehicle_name is drifting !!" or something else depending on the class.
- carry_cargo()
prints "the vehicle_name is carrying cargo !!" or something else depending on the class
for each of the properties do a setter & getter (encabsulate the data).
Create tow other subclasses (inherit from vehicle):
- override the methods as needed for each subclass of vehicle.
- create at least one object of each class.
- call all the methods on each object.
classes's People
Contributors