Ibrahim A.

asked • 11/29/21

write basic C++ programs using selection control, and repetitions for a given problem



The purpose of this assignment is to write basic C++ programs using selection control, and repetitions for a given problem and demonstrate the implementation of appropriate programming features with suitable test data and output.

REQUIREMENT

ABC Chat Time is a booth for you to order different kinds of beverages. To buy a beverage, the customer must first specify the quantity of beverages that he wants. Then, the customer can choose a beverage from the following 3 flavours:

No. Item RM 1 Expresso 2.10 2 Cappucino 2.20 3 Latte 2.30

After that, the customer will have a choice to add extra milk with an additional price of 50 cents. Once the order has been made, the seller will show the total amount that the customer needs to pay.

Please note that if the quantity is more than one, then the customer needs to specify the kind of beverage that he wants for every quantity. He needs to also specify whether to add extra milk for every beverage.

Write a C++ program to capture the above requirements. Refer to next page for few sample outputs.





Sample output for this program is as follows:

Sample 1

Please enter beverage quantity => 1

No Item $ 1. Espresso 2.10 2. Cappuccino 2.20 3. Latte 2.30

Please enter which beverage (1, 2 or 3) => 3 Please enter whether you want additional milk (Y or N) => Y

The total amount is $2.80

1 Expert Answer

By:

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.