From 4559b331d4e8149de5889f5d1abaca8324bb2eb1 Mon Sep 17 00:00:00 2001 From: Vlad Dzerzhynskyi <86209562+dzerzhynskyi@users.noreply.github.com> Date: Mon, 2 Dec 2024 16:05:50 -0500 Subject: [PATCH 1/3] Add files via upload --- Plane.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Plane.py diff --git a/Plane.py b/Plane.py new file mode 100644 index 0000000..c250174 --- /dev/null +++ b/Plane.py @@ -0,0 +1,22 @@ +class Plane(Vehicle): + def __init__(self, make, model, capacity): + super().__init__(make, model) # Call the initializer of the parent class + self.capacity = capacity + + def display_info(self): + super().display_info() # Call the parent method to display common info + print(f"Capacity: {self.capacity} passengers") + + def take_off(self): + print(f"The {self.model} is now taking off.") + + def land(self): + print(f"The {self.model} has landed safely.") + +if __name__ == "__main__": + my_plane = Plane("Boeing", "747", 416) + my_plane.display_info() + my_plane.start() + my_plane.take_off() + my_plane.land() + my_plane.stop() From ce1e56f4e2ddd4f60e00e895a1c3ab8fc55ddac8 Mon Sep 17 00:00:00 2001 From: Vlad Dzerzhynskyi <86209562+dzerzhynskyi@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:04:45 -0500 Subject: [PATCH 2/3] Delete Plane.py --- Plane.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 Plane.py diff --git a/Plane.py b/Plane.py deleted file mode 100644 index c250174..0000000 --- a/Plane.py +++ /dev/null @@ -1,22 +0,0 @@ -class Plane(Vehicle): - def __init__(self, make, model, capacity): - super().__init__(make, model) # Call the initializer of the parent class - self.capacity = capacity - - def display_info(self): - super().display_info() # Call the parent method to display common info - print(f"Capacity: {self.capacity} passengers") - - def take_off(self): - print(f"The {self.model} is now taking off.") - - def land(self): - print(f"The {self.model} has landed safely.") - -if __name__ == "__main__": - my_plane = Plane("Boeing", "747", 416) - my_plane.display_info() - my_plane.start() - my_plane.take_off() - my_plane.land() - my_plane.stop() From 5f19cd16ed0118105694325b12a5adf2fc7d95cf Mon Sep 17 00:00:00 2001 From: Vlad Dzerzhynskyi <86209562+dzerzhynskyi@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:08:15 -0500 Subject: [PATCH 3/3] Add files via upload --- Plane.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Plane.py diff --git a/Plane.py b/Plane.py new file mode 100644 index 0000000..c250174 --- /dev/null +++ b/Plane.py @@ -0,0 +1,22 @@ +class Plane(Vehicle): + def __init__(self, make, model, capacity): + super().__init__(make, model) # Call the initializer of the parent class + self.capacity = capacity + + def display_info(self): + super().display_info() # Call the parent method to display common info + print(f"Capacity: {self.capacity} passengers") + + def take_off(self): + print(f"The {self.model} is now taking off.") + + def land(self): + print(f"The {self.model} has landed safely.") + +if __name__ == "__main__": + my_plane = Plane("Boeing", "747", 416) + my_plane.display_info() + my_plane.start() + my_plane.take_off() + my_plane.land() + my_plane.stop()