added tractor

This commit is contained in:
michalnowak18 2022-03-10 17:36:24 +01:00
parent bca7592985
commit 365b33ffa3

24
Tractor.py Normal file
View File

@ -0,0 +1,24 @@
class Vehicle:
def __init__(self,
numWheels,
engine,
numDoors,
colour):
self.numWheels = numWheels
self.engine = engine
self.numDoors = numDoors
self.colour = colour
class Tractor(Vehicle):
def __init__(self,
numWheels,
engine,
numDoors,
colour,
addition,
trajectory):
super().__init__(numWheels, engine, numDoors, colour)
self.addition = addition
self.trajectory = trajectory
tractor = Tractor(4, "spalinowy", 2, "czerwony", "dodatek", "trajektoria")