Develop a machine that allows the user/consumer to checkout the products selected and pay the money. First, the consumer will select products and the quantity of each product. Second, the machine will display the receipt. Third, the consumer will need to pay the total amount of money.
Prompt the consumer to select a product and the quantity. The consumer can select from a list of 3 products: s for soda, k for cookies, and c for chips. Allow the consumer to buy multiple items: E.g., 2 soda and 3 chips −The consumer may pick one product multiple times. E.g., a consumer may first select 2 cans of soda, then 1 bag of chips, then another 3 cans of soda. The receipt should show 5 cans of soda and 1 bag of chips.−The price is different: Soda is $1, cookies is $2, and chips is $1.5. For simplicity, let’s use cent as the unit in the program so that we only need to deal with integers. After the consumer done with selecting products, display the receipt of each product the consumer selected and its quantity. Also display the total amount to pay.
Payment: Update the user the amount left, every time a coin or cash is inserted. The user will get the product (by showing a message) only when he pays all the money. After all is done, return the change (by showing a message) if the user overpays.−Coin or cash: the machine can only recognize nickels, dimes, quarters, 1-dollar cash, 5-dollar cash, and 10-dollar cash. Explain these choices to the user. You can use n for nickels, d for dimes, q for quarters, “1” for 1-dollar, “5” for 5-dollar, and “10” for 10-dollar. Ensure the validity of user input: Send a warning if the user selects a non-existing product. Prompt the user to re-enter.
Send a warning if the user insert an unrecognizable coin or cash.
4 freelancer chào giá trung bình$15 cho công việc này
Hi Sir, I have read your project description and I am interested in it. I am expert in c# widows form applications .I can provide a quality solution for your project. Contact with me . Thanks!