Answered step by step
Verified Expert Solution
Link Copied!

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 1 TL to customers who bring back their coffee cups forrecycling, and the software should deduct this returned amount from the total earnings. Caramel Macchiato -135 TL Caffe Latte 109 TL White Chocolate Mocha 145 TL Filter Coffee -90 TL Cappuccino 99 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.1) 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 Exit2) 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 value.3)The 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 printthem.4)The 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 (e.g., the cashiershould enter 1 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.1. Caramel Macchiato -135 TL2. Caffe Latte 109 TL3. White Chocolate Mocha 145 TL4. Filter Coffee -90 TL5. Cappuccino 99 TL5)When 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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

A Complete Guide To Data Science Essentials

Authors: Miguel

1st Edition

9358684992, 978-9358684995

More Books

Students also viewed these Databases questions

Question

Describe Freuds view of personality.

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago