Problem:

Write a C++ program that will allow a user to manage the inventory of a small store.

The inventory for the small store will contain the following information for each product in the inventory:

  • product name (i.e. “Apple iPhone 3GS 8GB”, may contain spaces in it, must be unique)
  • locator (string with no spaces, used to locate product, not necessarily unique)
  • quantity (how many of this product in stock, greater than or equal to 0)
  • price (in dollars and cents, greater than 0)

Note: You may assume the store has 100 products or less.

The program should offer the user a menu with the following options:

  • Add a new product to the inventory (prompt user for input values).
  • Remove a product from the inventory (by product name).
  • Adjust the quantity of a product (given the product name, and change amount).
  • Display the information for a product (given the product name).
  • Display the inventory sorted by product name.
  • Quit

The program should perform the selected operation and then re-display the menu.

Do not change the menu numbers associated with the operations.

Note for options 1 and 2, you are not changing the quantity of a product. You are adding (or removing) the information about a product from the inventory (you are adding or removing something from an array).

For the Add operation, a complete solution will ensure that the inventory is not full before adding a new product, and it will make sure the product name is unique in the inventory. If it fails to add a product, it will output a message indicating why.

For the Remove operation, the program should in

The implementation of option 3, Adjust the quantity, is optional. The option must be in the menu, but if chosen it may output “This feature is not yet implemented”. If implemented, it should ensure the quantity does not become negative (but 0 is valid).

For option 4, if the product is not found, display an appropriate message.

For option 5, display the information for each product on a separate line. The values should line up in columns (headers for the table are optional). If the inventory is empty, you may output an empty table (no need to display an error message).

Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only 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 fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.