r/pythonhelp • u/Noobie_python_user • Feb 02 '21
HOMEWORK Need guidance in using python classes.
Hello,
before I begin I just wanted to say that I am brand new to any type of programming So thank you in advance for your patience and help.
I am currently working on a school assignment utilizing python classes to:
1.) Create a Vehicle class with the following attributes and functions:
Attributes: make, model, color, fuelType, options (which will be defined as a python list chosen by the user when presented with a menu of programmer chosen vehicle options that can apply to both cars and pickup trucks
Options: power mirrors, power locks, power windows, remote start, backup camera, bluetooth, cruise control, GPS
functions: getMake(), getModel(), getColor(), getFuelType(), getOptions().
2.) Create a Car class as a child of the Vehicle class with the following attributes and functions:
Attributes: engineSize, numDoors
Functions: getEngineSize(), getNumdoors()
3.) Create a Pickup class as a child of the Vehicle class with the attributes and functions :
Attributes: cabStyle, bedLength
Functions: getCabstyle(), getBedLength()
4.) Your program will prompt the user to create at least one object of each type (Carand Pickup) allowing the user to define the attributes of the vehicles in their garage.
5.) Using a menu system and capturing user input your program will allow the user the choice of adding a car or pickup truck and define the vehicle's attributes.
6.)
The user will choose from a list of options to add to the vehicle's options list and must choose a minimum of one vehicle option per vehicle.
7.) Your program must allow the user to have multiple vehicles in their virtual garage and must have at least one Car and one Pickup.
8.) When the user is finished adding vehicles to their virtual garage the program will output the vehicles in their garage and their attributes.
whew, what a list! Alas, I am lost in the woods on this one as I'm not quite sure where to begin with the user inputs, and I don't really know what the requirements are asking for within the functions. All I have done so far is code the classes (See screenshot) should I begin with creating a class method for the inputs?
Again I appreciate any advice on how I should move forward with the rest of the requirements.

1
u/[deleted] Apr 18 '21
Did you ever figure it out this my project for this week and I am also stuck on how to use user input?