A store applies a 15 percent service charge on all items with a price of at least $150. No service charge is otherwise applicable. Which of the following DOES NOT correctly compute the service charge?
A) double serviceCharge = 0;
If (cost >= 150)
{
ServiceCharge = 0.15 * cost;
}
B) double serviceCharge = 0.15 * cost;
If (cost <= 150)
{
ServiceCharge = 0;
}
C) double serviceCharge;
If (cost < 150)
{
ServiceCharge = 0;
}
Else
{
ServiceCharge = 0.15 * cost;
}
D) double serviceCharge = 15;
If (cost >= 150)
{
ServiceCharge = 0.15 * cost;
}
Else
{
ServiceCharge = 0;
}
Correct Answer:
Verified
Q56: Assuming that a user enters 64 as
Q57: Consider the following code snippet: boolean attendance
Q58: Consider the following code snippet. Assuming that
Q59: Assuming that a user enters 56 for
Q62: What is the output of the following
Q63: Which of the following options correctly represents
Q64: Consider the following code snippet:
Int score =
Q65: Assuming that a valid price should be
Q66: Assuming that a user enters 45, 78,
Q93: Which of the following variables is used
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