Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Sample Run: (inputs are marked as bold) OPERATIONS : 1. Stock Info 2. Update Stocks 3. Update Prices 4. Sell 5. Current cash info 6.
Sample Run: (inputs are marked as bold) OPERATIONS : 1. Stock Info 2. Update Stocks 3. Update Prices 4. Sell 5. Current cash info 6. Quit Select your operation : 2 ************ ************* Current Stock Information : 1. Red Rose : 2. Pink Rose : 0 3. White Rose : 0 4. Yellow Rose : 0 5. Black Rose : 0 Select product : 2 Enter stock for 'Pink Rose' product : 55 ****** Current Stock Information: 1. Red Rose : 2. Pink Rose : 55 3. White Rose : 0 4. Yellow Rose : 0 5. Black Rose : 0 ***** ****** OPERATIONS : 1. Continue update stock 2. Return main menu Select your operation : 2 Imagine you cultivate and sell roses. You cultivate roses only in 5 colors. (Red. Pink, White, Yellow, Black) You need a menu based program for your shop to track rose commerce. You should be able to do the following operations: - Check current stock information - Update stocks - Update prices - Sell product (with stock control) - Check current cash information Notes: - Initial stocks : Red Rose : 0 Pink Rose: 0 White Rose: 0 Yellow Rose : 0 Black Rose : 0 - Initial prices : Red Rose : 5 TL Pink Rose : 6 TL White Rose : 7 TL Yellow Rose : 8 TL Black Rose : 20 TL Use the following functions : -printMainMenu Prints main menu (as seen in the sample run) -printStockInformation Prints stock information (as seen in the sample run) - print Product Prices Prints product price (as seen in the sample run) - print Products Prints product information (as seen in the sample run) - printCashInfo Prints current cash information (as seen in the sample run) - stock Control parameters: 'productStockInfo' and 'numberOfRequested return: if stock is enough retum 1, else return 0 - updateStocks Changes products stocks - updatePrices Changes products prices - sello Check the stock, sell products, then update stocks and arrange a bill - calculateBillo Prints productPrice x numberOfRequested = resultant.' message. parameters: 'productPrice' and 'numberOfRequested return: resultant value. - addMoneyo Prints Add x TL to cash register.' message and update total cash parameters: resultant from the bill - You can add other functions, but you have to implement all the functions listed above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started