Complete with stage 1 on making an OOP example #1

Merged
JMR-dev merged 10 commits from jr-shellbranch into main 2022-06-30 18:44:24 +00:00
Showing only changes of commit b222fc0893 - Show all commits
+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