added tractor
This commit is contained in:
parent
bca7592985
commit
365b33ffa3
24
Tractor.py
Normal file
24
Tractor.py
Normal 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")
|
Loading…
Reference in New Issue
Block a user