Question: For this assignment you are to create a Python program with the following characteristics: 1 . Have a parent class called vehicles. 2 . Have

For this assignment you are to create a Python program with the following characteristics:
1. Have a parent class called vehicles.
2. Have two child classes called cars and trucks.
3. The vehicle class should have the following attributes:
a. VIN number
b. Odometer reading
c. Color
d. Make
e. Model
f. Owner (which should be a list)
4. The car class should have the following attributes:
a. Carpet color
b. Seat material
c. List of exterior options
d. Condition (new, good, fair, poor, junk)
5. The truck class should have the following attributes
a. Fuel type (gas, diesel, LNG)
b. Max load in pounds
c. Number of axels
d. Height in inches
e. Registration status (T/F)
6. The vehicle class should have the following methods:
a. Update odometer reading
b. Update color
c. Change owner
d. Display current owner
e. Display all owners
7. The car class should have the following methods:
a. Add exterior option
b. Change condition
8. The truck class should have the following methods:
a. Update max load
b. Change registration status
9. The program should create instances of two trucks and three cars.
10. Make a list of all vehicles which only contains two lists, a list of cars and a list of trucks
11. Create a function to update the mileage of the vehicle with a random amount from 10-50 miles
12. Using a FOR loop and calls to the mileage function, update the mileage for all vehicles
13. Create a function to change pounds to kilograms.
14. Using a FOR loop, print out all of the trucks information but have the max weight shown in kilograms.
15. Have the code appropriately commented.
16. Have the code be located in three files, name_HW3, name_functions, name_classes.
17. Submit the three code files and screen captures of the code executing.
(Question previously submitted but getting NameError: name "Trucks" is not defined.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!