Question: When the user selects option 1 , ask them for two pieces of information: which game they are buying and how many they are purchasing.

When the user selects option 1, ask them for two pieces of information: which game they are buying and how many they are purchasing. If you already have some stock of this game, increase its amount. If not, add this game to your inventory.
When the user selects option 2, ask them for two pieces of information: which game they are buying and how many they are selling. Verify that they can sell this number of games and update the stock. If you do not have that many games in stock, tell the user how many than can sell and remove the game from your inventory.
When the user selects option 3, show them each game in stock along with its stock amount. If the stock is less than 100, include a low stock alert. If the stock is higher than 1000, include a prompt to put the game on sale.
When the user selects option 4, you may terminate the program. There should be no further ouputs.
If the user enters an invalid input at any time, you should re-prompt the user for the correct input.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!