got both classes working

This commit is contained in:
2022-06-29 16:03:36 -05:00
parent b377951c78
commit b222fc0893
+8 -6
View File
@@ -28,13 +28,7 @@ addVehicle = Fleet("hovercraft", 50, "ground/water", 0)
vehicle1.displayAllFleetMembers()
class GroundVehicle(ABC, Vehicle):
@abstractmethod
def __init__(self, volume):
# default value set to true. Many ground vehicles will have trailers or train cars. Modified as needed
self.isModular = True
class Vehicle(ABC):
'''Defines the properties of vehicles'''
@@ -49,3 +43,11 @@ class Vehicle(ABC):
self.weightType = "kg"
self.weight = 0
class GroundVehicle(Vehicle):
@abstractmethod
def __init__(self, volume):
# default value set to true. Many ground vehicles will have trailers or train cars. Modified as needed
self.isModular = True