From cccb98111b144dfd46d29506fc888204e4c128ea Mon Sep 17 00:00:00 2001 From: "xuanyi.wang" Date: Thu, 13 Apr 2023 00:36:56 +0200 Subject: [PATCH] Update page 'Day 7 homework - Sloejtes' --- Day 7 homework - Sloejtes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Day 7 homework - Sloejtes.md b/Day 7 homework - Sloejtes.md index 3550a66..1666ea6 100644 --- a/Day 7 homework - Sloejtes.md +++ b/Day 7 homework - Sloejtes.md @@ -147,7 +147,9 @@ class Bike(Vehicle): * In this example, `Vehicle` class is the virtual base class that defines the shared methods and properties of the `Car` and `Bike` classes. The `num_wheels` property and `start` method are abstract methods that must be implemented in the concrete classes. The `stop` method is a non-abstract method that is the same for both `Car` and `Bike` objects. * The `Car` and `Bike` classes inherit from `Vehicle` and define the non-abstract methods and properties that are specific to each object. The `num_wheels` property and `start` method are implemented differently in each class. + ##### Implementation: + ``` obj_car=Car() obj_bike=Bike() @@ -161,7 +163,9 @@ print(obj_bike.num_wheels) print(obj_car.stop()) print(obj_bike.stop()) ``` + ###### Output: + ``` Starting the car engine. None