Answered step by step
Verified Expert Solution
Question
1 Approved Answer
develop a console - based ( character - based, not GUI ) system that records information about vehicles. The vehicles we will deal with are
develop a consolebased characterbased, not GUI system that records information about vehicles. The vehicles we will deal with are of the car, truck and SUV type. The test program for the application is partially written: see link to file below.
The program must be developed step by step and in the first part you must create the following classes:
The class Vehicle with the following characteristics:
brand
year model
mileage
price
A constructor that initializes all variables.
the method str which prints info about all members in the class.Car which inherits from Vehicle has the following additional data number of doors. A constructor that initializes all variables.
Override the str method which additionally prints data relevant to the Car class.
Truck that inherits from Vehicle has the following additional data
wheel drive, or WD
A constructor that initializes all variables
Override the str method which additionally prints data relevant to the Truck class.
SUV that inherits from Vehicle has the following additional data
passenger capacity
A constructor that initializes all variables
Override the str method which additionally prints data relevant to the SUV class.
Take cartrucksuvdemo.py as a starting point
enter code for menu items
In the second part of the assignment, you must add the following:
Enter code for menu item
One should be able to search the overview for a brand and have all vehicles of this brand printed out
When the program starts, all vehicles must be read from the file, if the file does not exist, the list of vehicles is set equal to an empty list.
When the program ends, all vehicles must be sorted and written to a file pickle unpickle
Add code to catch exceptions that the program may throw, typically errors in user input and errors in file handling
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started