|
Using your earlier `Car` class create `SportsCar` class that has better acceleration and deceleration (and higher gasoline consumption) than an ordinary Car. |
"Using your earlier Car class create SportsCar class that has better acceleration and deceleration (and higher gasoline consumption) than an ordinary Car."
The car class is defined at 2.1_Class_object_constructor_instance_variable_method.md, but it's deceleration is given with a parameter, and there is no gasoline consumption in the original class, and none of the 2.1 tasks add gasoline consumption.
Suggestion:
Remove Task 1 and modify Task 2 to also have the bus' accelerate() method be slower than the car's.
Object-Oriented-Programming/3.1_Inheritance.md
Line 726 in 1b33418
"Using your earlier
Carclass createSportsCarclass that has better acceleration and deceleration (and higher gasoline consumption) than an ordinary Car."The
carclass is defined at 2.1_Class_object_constructor_instance_variable_method.md, but it's deceleration is given with a parameter, and there is no gasoline consumption in the original class, and none of the 2.1 tasks add gasoline consumption.Suggestion:
Remove Task 1 and modify Task 2 to also have the bus'
accelerate()method be slower than the car's.