Question: This program will include a Purchase class that will create the parts list on construction. The parts list will be an attribute for each object.
This program will include a Purchase class that will create the parts list on construction. The parts list will be an attribute for each object.
The Purchase class will also contain functions to add, remove, and view parts. The add function will append a specified part to the end of the parts list. The remove function will remove a specified part from the parts list. The view function will print out every part in the parts list on a separate line.
In the main function of this program, construct a Purchase object. The main function will have options to add, remove, or view parts as well as exit the program. If the add or remove options are selected, ask the user to input the part to be added or removed, respectively. Repeat these options until the user chooses the option to exit. python
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
