Question: Consider the following class definitions: class Vehicle : . . . def __init__(self) : self._numAxles = 0 . . . def setAxles(self, num) : self._numAxles
Consider the following class definitions:
class Vehicle : . . . def __init__(self) : self._numAxles = 0 . . . def setAxles(self, num) : self._numAxles = num . . . class Motorcycle(Vehicle) : def __init__(self) : super().__init__() ________________________
Which statement should be placed in the blank so that all motorcycles have 2 axles?
| A. setAxles(2) |
| B. self.setAxles(2) |
| C. | super().setAxles(2) |
| D. | Vehicle.setAxles(2) |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
