1,105,340 Community Members

Used Vehicle classes

Member Avatar
jecelone
Newbie Poster
1 post since Dec 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
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()
Member Avatar
pyTony
pyMod
6,103 posts since Apr 2010
Reputation Points: 818 [?]
Q&As Helped to Solve: 1,056 [?]
Skill Endorsements: 42 [?]
Moderator
Featured
 
0
 
You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article