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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!