Following is a problem statement.  Which of the below is the correct trace table for the problem statement? Peter bought 18 cupcakes for his sons birthday, they cost R4,50 each.  Write a program that will accept the input from the user and then calculate the amount due by multiplying the number of cupcakes by the price and then adding 14% VAT to the amount.  Display the final amount he owes on the screen. Select one: a. Instruction quantity price amount vat finalAmount Output display           Provide the quantity bought enter 18           display           Provide the price of 1 item enter   4.50         calculate     81 11.34 92.34   display           The final amount due is R92.34 b. Instruction quantity price amount vat finalAmount Output enter 18           enter   4.50         calculate     81       calculate       11.34     calculate         92.34   display           The final amount due is R92.34 c. Instruction quantity price amount vat finalAmount Output display           Provide the quantity bought enter 18           display           Provide the price of 1 item enter   4.50         calculate     81       calculate       11.34     calculate         92.34   display           The final amount due is R92.34 d. Instruction quantity price Output display     Provide the quantity bought enter 18     display     Provide the price of 1 item enter   4.50   display     The final amount due is R92.34

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

Following is a problem statement.  Which of the below is the correct trace table for the problem statement?

Peter bought 18 cupcakes for his sons birthday, they cost R4,50 each.  Write a program that will accept the input from the user and then calculate the amount due by multiplying the number of cupcakes by the price and then adding 14% VAT to the amount.  Display the final amount he owes on the screen.

Select one:
a.

Instruction

quantity

price

amount

vat

finalAmount

Output

display

 

 

 

 

 

Provide the quantity bought

enter

18

 

 

 

 

 

display

 

 

 

 

 

Provide the price of 1 item

enter

 

4.50

 

 

 

 

calculate

 

 

81

11.34

92.34

 

display

 

 

 

 

 

The final amount due is R92.34

b.

Instruction

quantity

price

amount

vat

finalAmount

Output

enter

18

 

 

 

 

 

enter

 

4.50

 

 

 

 

calculate

 

 

81

 

 

 

calculate

 

 

 

11.34

 

 

calculate

 

 

 

 

92.34

 

display

 

 

 

 

 

The final amount due is R92.34

c.

Instruction

quantity

price

amount

vat

finalAmount

Output

display

 

 

 

 

 

Provide the quantity bought

enter

18

 

 

 

 

 

display

 

 

 

 

 

Provide the price of 1 item

enter

 

4.50

 

 

 

 

calculate

 

 

81

 

 

 

calculate

 

 

 

11.34

 

 

calculate

 

 

 

 

92.34

 

display

 

 

 

 

 

The final amount due is R92.34

d.

Instruction

quantity

price

Output

display

 

 

Provide the quantity bought

enter

18

 

 

display

 

 

Provide the price of 1 item

enter

 

4.50

 

display

 

 

The final amount due is R92.34 

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Types of Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
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