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
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.
Ask for the product key, then delete all info for that product.
Ask for the product key, then print the product’s name, price, quantity, and total number of sales (sales report).
Ask for the product key, then present the following submenu:
a. Update Product Name
b. Update Product Price
c. Update Product Quantity
Ask for the product key. Check if there is any product available. If available, input a quantity to sell, then update the “quantity” array.
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.