Write a program that simulates a menu for a bakery called cakes It will contain the following

Write a program that simulates a menu for a bakery called "cakes". It will contain the following options: a. Register Product b. Delete Product c. Print Product Info d. Update Product e. Sell Product f. Exit Option a: Ask for the product key, name, price, and quantity. Save all info into an array with 5 elements. You will register ONE product at a time, then your program will return to the main menu. Duplicate product keys are not allowed. Validate your program so that it cannot register more than 5 products. Option b: Ask for the product key, then delete all info for that product. Option c: Ask for the product key, then print the product's name, price, quantity, and total number of sales (sales report). Option d: Ask for the product key, then present the following submenu: a. Update Product Name b. Update Product Price c. Update Product Quantity d. Exit Option e: Ask for the product key. Check if there is any product available. If available, input a quantity to sell, then update the "quantity" array. Option f: Exit. Validate your program so that it does not accept negative values for price, quantity, and sales. Your menus must be implemented using switch cases, must loop with do-while loops, and must handle invalid inputs.

Write a program that simulates a menu for a bakery called “cakes”. It will contain the following options:

a. Register Product
b. Delete Product
c. Print Product Info
d. Update Product
e. Sell Product
f. Exit

Option a:
Ask for the product key, name, price, and quantity. Save all info into an array with 5 elements. You will register ONE product at a time, then your program will return to the main menu. Duplicate product keys are not allowed. Validate your program so that it cannot register more than 5 products.

Option b:
Ask for the product key, then delete all info for that product.

Option c:
Ask for the product key, then print the product’s name, price, quantity, and total number of sales (sales report).

Option d:
Ask for the product key, then present the following submenu:
a. Update Product Name
b. Update Product Price
c. Update Product Quantity
d. Exit

Option e:
Ask for the product key. Check if there is any product available. If available, input a quantity to sell, then update the “quantity” array.

Option f:
Exit.

Validate your program so that it does not accept negative values for price, quantity, and sales. Your menus must be implemented using switch cases, must loop with do-while loops, and must handle invalid inputs.


 
Solved By Verified
Study Co-Pilot All Study Co-Pilots are evaluated by Gotit Pro as an expert in their subject area.

 
Instant
Download

Student review: (5 ratings) 5 out of 5 people found this solution helpful.