Class Inheritance
Given:
Create a Bus class that inherits from the Vehicle class. Give the capacity argument of Bus.seating_capacity()
a default value of 50.
Use the following code for your parent Vehicle class.
Expected Output:
The seating capacity of a bus is 50 passengers
Hint:
seating_capacity()
method definition of a bus class.Solution:
need an explanation for this answer? contact us directly to get an explanation for this answer