From ffad05e5ef1ca8c48c1a2c35bbe0d2ca9d0aa1d5 Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Thu, 7 Jul 2022 10:42:43 -0500 Subject: [PATCH] plop --- fleet.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fleet.py b/fleet.py index 6d70996..92a0ca8 100644 --- a/fleet.py +++ b/fleet.py @@ -85,10 +85,11 @@ Train1.displayLocomotiveCount() # At this point, my code should print out the values from the car count and the locomotive count. Further demonstration of abstract and concrete classes to follow. +# Always encapsulate parent constructors into child classes to make those variables available class semi_Truck(RoadVehicle): def __init__(self, _noOfTrailersAttached): self.noOfTrailersAttached = _noOfTrailersAttached - super().travel(Vehicle.status) + super(Vehicle.status,GroundVehicleInterface.travel()) # Don't modify passed in values unless absolutely necessary def displayNoOfTrailersAttached(self): print(self.noOfTrailersAttached)