Answered step by step
Verified Expert Solution
Question
1 Approved Answer
You are interning at a software development company. For a project, you are expected todevelop software to be used in a coffee shop. The software
You are interning at a software development company. For a project, you are expected todevelop software to be used in a coffee shop. The software should calculate how many ofeach type of coffee are sold daily and the total amount of money earned from these sales.Additionally, the coffee shop returns TL to customers who bring back their coffee cups forrecycling, and the software should deduct this returned amount from the total earnings. Caramel Macchiato TL Caffe Latte TL White Chocolate Mocha TL Filter Coffee TL Cappuccino TLName and Surname:ID Number:Section: Signature:You need to define separate functions for the following features: Display the number of coffee sales and the number of recycling. Perform a coffee sale. Show the total earnings. Handle recycling.The functions you need to define and their content are detailed below The main function should ask the user what action they want to take. Based on theusers choice, it should call the necessary function and display the required information. Theapplication should continue running until the user enters the letter Q The options presented tothe user are as follows: T Calculate and display the total earnings. C Display the number of sales for each type of coffee and the number of recyclingtransactions. S Perform a coffee sale. R Handle a recycling transaction. Q Exit The function that calculates and displays the total earnings should take the necessaryvariables from the main function and calculate the total earnings. Then, it should print theresult and returns as a function valueThe function that displays the number of sales for each type of coffee and the number ofrecycling transactions should take the necessary variables from the main function and printthemThe function that handles coffee sales should ask the user which type of coffee theywant to buy and enter the corresponding number for the chosen coffee eg the cashiershould enter for Caramel Macchiato The function should update the sales count andreturns as a parameter. It is assumed that a single coffee is purchased per transaction Caramel Macchiato TL Caffe Latte TL White Chocolate Mocha TL Filter Coffee TL Cappuccino TLWhen the handling recycling function is called, the count of recycling operations shouldbe updated and returns as a parameter.
Write this code for DevC
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