Consider a situation where you are buying videos online. The video seller charges $21.50 as the price per video and $6.75 as the handling cost for up to three videos. For every video purchased in addition to three videos, there is a handling charge of $1.50. In addition, there is a 9 percent tax on the cost of the videos but not on the handlingCharges. Assuming that numVideos represents the number of videos you are purchasing, which of the following is the correct algorithm for calculating the total cost of your purchase?
A) Total charge for videos = 21.50 * numVideos
Tax on the videos = numVideos * .9
If (numVideos <= 3) then handlingCharges = 6.75
Else handlingCharges = 1.50 * numVideos
Total cost of order = total charge for videos + tax + handlingCharges
B) Total charge for videos = 21.50 * numVideos
Tax on the videos = total charge for videos * .9
If (numVideos = 3) then handlingCharges = 6.75
Else handlingCharges = 1.50 * numVideos
Total cost of order = total charge for videos + tax + handlingCharges
C) Total charge for videos = 21.50 * numVideos
Tax on the videos = numVideos * .09
If (numVideos < 3) then handlingCharges = 6.75
Else handlingCharges = 6.75 + 1.50 * (numVideos - 3)
Total cost of order = total charge for videos + tax + handlingCharges
D) Total charge for videos = 21.50 * numVideos
Tax on the videos = total charge for videos * .09
If (numVideos <= 3) then handlingCharges = 6.75
Else handlingCharges = 6.75 + 1.50 * (numVideos - 3)
Total cost of order = total charge for videos + tax + handlingCharges
Correct Answer:
Verified
Q38: A Java class with the name Printer
Q39: Every statement in Java must be terminated
Q40: Every Java program consists of one or
Q41: What is the purpose of the following
Q42: Imagine you are planning to purchase a
Q44: Imagine you are planning to buy a
Q45: Consider a situation where you are buying
Q46: What is the purpose of the following
Q47: While developing a program, the programmer adds
Q48: UML Supermarket has different ways of awarding
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents