Description: For project 5 we are going to build a menu-driven application that will allow a user to maintain their collections. For example, I might have a coin collection, or a record collection, or a collection of all my valuable items.

An Item includes the following properties:

  • Category - the category the item belongs to. For example, 'Records', Antiques, Coins, etc.
  • Description - the description of the item. For example, 1940 Sewing machine
  • Value - the value of the item in dollars
  • Quantity - the number of items of this type that I have. For example, I might have two 1940 Sewing Machines

A Collection contains Item objects as described above.

The main menu is as follows:

Welcome to my Collection Manager

1. Display all items in my collection
2. Display all categories of my items
3. Display all items in a given category
4. Search for an item by description
5. Add a new item to my collection
6. Display all items above a given value
7. Calculate the total value of my collection
S. Save to disk
L. Load data from disk
Q. Quit

Please enter a selection:

The following functionality should be implemented for the following menu items:

1. Display all items in my collection

All items in the collection should be displayed in a nicely formatted table, for example: see image.

2. Display all categories of my items: see image.

3. Display all items of a given category: see image.

4. Search for an item by description see image.

If the provided item description does not exist a message should be displayed to the user.

5. Add a new item to my collection see image.

6. Display all items above a certain value see image.

7. Display the total value of my collection see image.

S. Save data see image.

Save the Collection data to a file on disk.
Note: this is already implemented by my using pickle

L. Load data from disk see image.

Load data from a disk file and initialize the collection from this data.
Note: this is already implemented by my using pickle

Q. Quit see image.

Exit the application.

Implementation Details

This application must be implemented using the Object-Oriented features of Python. I will provide the main template for the assignment as a Python file.

Your solution MUST include classes for the Item and Collection. These are provided in the template. I have already implemented the Item class and I have also provided some of the implementation for the Collection class.

I am also providing the implementation for the main function, which handles user menu selection and calls the appropriate Collection class methods depending on the user selections.

You MUST complete the implementation of the Collection class. Please refer to the inline documentation in the provided Python file as well as the video demo that I will provide. I chose to provide a partial implementation because it is important that you can understand someone else's code and be able to extend and modify it to solve a problem. Professional programmers spend most their time working with code that was written by someone else.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.