From 56e950fb1de2d42c6aeebf1cc3ea26a3f986449d Mon Sep 17 00:00:00 2001 From: Justinp Date: Mon, 25 Nov 2024 19:10:09 -0500 Subject: [PATCH 1/5] forked --- Vehicle.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Vehicle.py b/Vehicle.py index 260f28e..572bf47 100644 --- a/Vehicle.py +++ b/Vehicle.py @@ -11,9 +11,4 @@ def display_info(self): def honk(self): """A general honk sound for all vehicles.""" return "Beep beep!" - - def fuel_up(self): - return "Full tank" - - def brake(self): - print("Braking the car.") + From b314b96727d9854ddfa1f9cb6843fd1814d7c7e0 Mon Sep 17 00:00:00 2001 From: Justinp Date: Mon, 25 Nov 2024 21:26:47 -0500 Subject: [PATCH 2/5] Commit #2 --- Bike.py | 0 Vehicle.py | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 Bike.py diff --git a/Bike.py b/Bike.py new file mode 100644 index 0000000..e69de29 diff --git a/Vehicle.py b/Vehicle.py index 572bf47..260f28e 100644 --- a/Vehicle.py +++ b/Vehicle.py @@ -11,4 +11,9 @@ def display_info(self): def honk(self): """A general honk sound for all vehicles.""" return "Beep beep!" - + + def fuel_up(self): + return "Full tank" + + def brake(self): + print("Braking the car.") From 2892ce9f48734ed16f622d443fa0e1d861bc9247 Mon Sep 17 00:00:00 2001 From: Justinp Date: Mon, 25 Nov 2024 21:35:56 -0500 Subject: [PATCH 3/5] Fixed commit --- Vehicle.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Vehicle.py b/Vehicle.py index 260f28e..2818990 100644 --- a/Vehicle.py +++ b/Vehicle.py @@ -17,3 +17,6 @@ def fuel_up(self): def brake(self): print("Braking the car.") + + def park(self): + return "The car is at 0 mph now, and parked" From 43e5b79f637aeac98f4f537f5c472148ce4818a7 Mon Sep 17 00:00:00 2001 From: Justinp Date: Mon, 25 Nov 2024 21:45:28 -0500 Subject: [PATCH 4/5] Fixed Commit v2 --- Bike.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Bike.py b/Bike.py index e69de29..99a6b08 100644 --- a/Bike.py +++ b/Bike.py @@ -0,0 +1,14 @@ +from Vehicle import Vehicle + +class Car(Vehicle): + def __init__(self, brand, model, year, gears): + super().__init__(brand, model, year) + + def display_info(self): + """Override the parent class method for a Car.""" + return f"Bike: {self._brand} {self._model}, {self.gears} gears ({self._year})" + + def bell(self): + """Specific implementation for a car.""" + return "Ring ring!" + \ No newline at end of file From 76e24fe0c40a0965a9f002ec1e23466a3ed948f4 Mon Sep 17 00:00:00 2001 From: Justinp Date: Mon, 2 Dec 2024 18:05:40 -0500 Subject: [PATCH 5/5] Fixed Class name --- Bike.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Bike.py b/Bike.py index 99a6b08..9f266df 100644 --- a/Bike.py +++ b/Bike.py @@ -1,6 +1,6 @@ from Vehicle import Vehicle -class Car(Vehicle): +class Bike(Vehicle): def __init__(self, brand, model, year, gears): super().__init__(brand, model, year)