Start New Discussion within our Software Development Community

There are websites such as 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 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()
This article has been dead for over six months. Start a new discussion instead.