A coffee shop offers a range of drinks

  • Tea - $1.00
  • Coffee - $1.50
  • Hot Chocolate - $2.00
  • Chai Latte - $1.75
  • Flat White - $2.20

You will need to create a program that keeps track of the total spent after each order.

  • At the end of the day the manager will end the program.
  • It will now print out the total amount of drinks sold that day.
  • A breakdown for the amount of each drink.
  • The cost of drinks can be assumed to be 20c, 25c, 50c, 25c and 50c per cup.
  • Total cost of all drinks should be removed from profit.
  • All running costs will equate to $10 per day.
  • The company employees will recieve a pay-out of 2% of the days profits if they have sold more than 20
    Chai Latte or Flat Whites.

The solution MUST be modular.

It must use the functions for
PrintHeader
TotalSales
OverallProfit
CalculateCosts
IncentiveCheck

Example of layout -

----------------
CHEAPO DRINKS CO
    Evesham
----------------

Add in sale? Y/N: Y
Drink type?

1.      Tea
2.      Coffee
3.      Hot Chocolate
4.      Chai Latte
5.      Flat White
You Chose: 3

Add in sale?: N

Total sales: 1
Total tea sales: 1
Total coffee sales: 0
Total hot chocolate sales: 0
Total chai latte sales: 0 
Total flat white sales: 0

Total value of today's sales: $2.00
Running costs on drinks: $0.50

Total profit for today: $1.50

No incentive targets met.
Incentive payout: $0.00

"ok"..

I can't decide which answer is most appropriate, so I'll provide both:

  1. Do your own damn homework!
  2. Please provide proof of effort and then ask a specific question if you want help with this problem.

I agree with deceptikon, you will never learn if you dont even give it a try.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.