7. The Jumpin' Jive coffee shop charges $2 for a cup of coffee and offers the add-ins shown in Table 6-2. Product Whipped cream Cinnamon Chocolate sauce Amaretto Irish whiskey Price ($) 0.89 0.25 0.59 1.50 1.75 Design the logic for an application that allows a user to enter ordered add-ins continuously until a sentinel value is entered. After each item, display its price or the message Sorry, we do not carry that as output. After all items have been entered, display the total price for the Table 6-2 Add-in list for Jumpin' Jive coffee shop

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Write c++ code and pseudocode for the question in the picture attached

// Pseudocode PLD Chapter 6 #7, pg. 266
//
// Start
// Declarations
// num SIZE = 5
// num COFFEEPRICE = 2.00
// string products[SIZE]="Whipped cream", "Cinnamon", "Chocolate
sauce", "Amaretto", ""Irish whiskey"
// num prices[SIZE]=0.89, 0.25, 0.59, 1.50, 1.75
// num totalPrice = 0
// num choice = 0
// num SENTINEL = -1
//
// while (choice <> SENTINEL))
// output "Please select an item from the Product menu by selecting
the item number (1 - 5) or -1 to terminate: "
// output "Product Price ($)"
// output "======= ========="
// output "1. Whipped cream 0.89"
// output "2. Cinnamon 0.25"
// output "3. Chocolate sauce 0.59"
// output "4. Amaretto 1.50"
// output "5. Irish whiskey 1.75"
// output "Please enter a positive number: "
// input choice
// if (choice <> -1) then
// if ((choice >= 1) and (choice <= 5)) then
// totalPrice = totalPrice + prices[choice-1]
// output "Item number ", choice,": ", products[choice-1], " has
been added"
// else
// output "Item number ",choice, " is not valid", "Sorry we do
not carry that item"
// endif
// endif
// endwhile
// totalPrice = totalPrice + COFFEEPRICE
// output "Total price of order is ",totalPrice
// output "Thanks for purchasing from Jumpin Jive Coffee Shop"
// Stop

 
7. The Jumpin' Jive coffee shop
charges $2 for a cup of coffee
and offers the add-ins shown in
Table 6-2.
Product
Whipped cream
Cinnamon
Chocolate sauce
Amaretto
Irish whiskey
Price ($)
0.89
0.25
0.59
1.50
1.75
Design the logic for an
application that allows a user
to enter ordered add-ins
continuously until a sentinel
value is entered. After each
item, display its price or the
message Sorry, we do not carry
Add-in list for Jumpin' Jive coffee shop
that as output. After all items have been entered, display the total price for the
order.
Table 6-2
Transcribed Image Text:7. The Jumpin' Jive coffee shop charges $2 for a cup of coffee and offers the add-ins shown in Table 6-2. Product Whipped cream Cinnamon Chocolate sauce Amaretto Irish whiskey Price ($) 0.89 0.25 0.59 1.50 1.75 Design the logic for an application that allows a user to enter ordered add-ins continuously until a sentinel value is entered. After each item, display its price or the message Sorry, we do not carry Add-in list for Jumpin' Jive coffee shop that as output. After all items have been entered, display the total price for the order. Table 6-2
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY