Question: ` ` ` limousine . py l class . . . Tester.py from limousine import Limousine def main ( ) : aLimo = Limousine (
limousinepy
l class
Tester.py
from limousine import Limousine
def main :
aLimo Limousine
aLimo.setLicensePlateNumberWH
printInfoaLimoWH
bigCar Limousine
bigCar.setLicensePlateNumberPYTHON
printInfobigCar "PYTHON"
def printInfocar plates :
printcargetDescription
printExpected: A car with license plate", plates
printTires: car.getNumberOfTires
printExpected:
main
car.py
## This module defines classes that model vehicles.
#
## A generic vehicle superclass.
#
class Vehicle :
## Constructs a vehicle object with a given number of tires.
#
def initself numberOfTires:
slfnmberOfTires numberOfTires
## Gets the number of tires on the vehicle.
# @return number of tires
def getNumberOfTiresself:
## Changes the number of tires on the vehicle.
# @param newValue the number of tires
def setNumberOfTiresself newValue :
self.numberOfTires newValue
## Gets a description of the vehicle.
# @return a string containing the description
def getDescriptionself:
return "A vehicle with self.numberOfTires tires"
## A specific type of vehicle car.
#
class CarVehicle :
## Constructs a car object.
#
def initself :
# Call the superclass constructor to define its instance variables.
superinit
# This instance variable is set by the subclass.
self.plateNumber
## Sets the license plate number of the car.
# @param newValue a string containing the number
def setLicensePlateNumberself newValue :
self.plateNumber newValue
## Gets a description of the car
# @return a string containing the description
#
def getDescriptionself :
return "A car with license plate self. plateNumber
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
