The inventory management system needs to work with "Stock Index Cards" (SIC). SICs record the following pieces of information for each title being sold:

  • SIC-ID This is a unique integer used to identify every title in the inventory.
  • Title The title of the book being sold.
  • Author The author of the book.
  • Price The price the book is being sold for.
  • Quantity The number of copies the bookstore has of the book.

The inventory management system should offer the user a menu of the following options:

1.Add new Stock Index Card (will need to prompt the user to enter SIC-ID, Title, Author, Price, Quantity)

2.Remove Stock Index Card by SIC-ID

3.Increase Stock by SIC-ID (ask for the quantity)

4.Decrease Stock by SIC-ID (ask for the quantity)

5.Display Stock Index Card by SIC-ID

6.Display Stock Index Card by Author (show all that apply)

7.Display Stock Index Card by Title (show all that apply)

8.Display All Stock Index Cards

9.Change price by SIC-ID (price can't be negative)

10.Quit

The program should perform the operation selected by number and then re-display the menu. If the operation fails (e.g., invalid input or attempt to remove a book not in the inventory), your program should display an error message.

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.