From eb983455ce5159d1880fc9b9332dc2ab0ae41b54 Mon Sep 17 00:00:00 2001 From: Chenzom Date: Mon, 9 Dec 2024 18:41:42 -0500 Subject: [PATCH] Initial commit --- Bus.py | 15 +++++++++++++++ Motorcycle.py | 3 +++ 2 files changed, 18 insertions(+) create mode 100644 Bus.py diff --git a/Bus.py b/Bus.py new file mode 100644 index 0000000..2c056f7 --- /dev/null +++ b/Bus.py @@ -0,0 +1,15 @@ +from Vehicle import Vehicle + +class Bus(Vehicle): + def __init__(self, brand, model, year, arrival): + super().__init__(brand, model, year) + self.arrival = arrival + + def display_info(self): + return f"Bus: {self._brand} {self._model}, Max load: {self.max_load} tons({self._year})" + + def honk(self): + return "Honk honk!" + + def display_Arrival(self): + return "Arrival time." \ No newline at end of file diff --git a/Motorcycle.py b/Motorcycle.py index 992790d..4a17990 100644 --- a/Motorcycle.py +++ b/Motorcycle.py @@ -13,3 +13,6 @@ def display_info(self): def honk(self): """Specific implementation for a motorcycle.""" return "Meep meep!" + + def fuel_up(self): + return "Fill until full"