1.11M Members

Used Vehicle classes

 
0
 

There are websites such as http://www.cars.com that provide information about secondhand vehicles. Design a base class for vehicle with fields such as model, year, total mileage, vehicle identification number (VIN), EPA class, EPA mileage, engine, transmission, and options.
Design subclasses for car, truck, SUV, and minivan. Think about the specific fields and methods required for the subclasses.

This what I got so far am I doing it right...

class UsedVehicle(object):

def __int__(self, model, year, total mileage, VIN\
            , EPA, EPA mileage, engine, transmission):
    self.model = model
    self.year = year
    self.total mileage = total mileage
    self.VIN = VIN
    self.EPA = EPA
    self.EPA mileage = EPA mileage
    self.engine = engine
    self.transmission = transmission

def __repr__(model):

    return self.model()

def __repr__(year):

    return self.year()
You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article