You have been asked to develop an algorithm to calculate the total cost of a purchase order that contains several T-shirts. The cost of each T-shirt and the tax rate is known. The standard shipping charge for the entire order is $5.75, and the special delivery charge is $23.65. In addition, there is no tax on the shipping cost. Which of the following is the correct pseudocode for the required algorithm?
a) For each T-shirt on the purchase order:
Order cost = order cost + T-shirt cost
Total purchase order cost = order cost + tax rate + 5.75
b) For each T-shirt on the purchase order:
Order cost = order cost + T-shirt cost
If standard shipping
Shipping cost = 5.75
Else
Shipping cost = 23.65
Total purchase order cost = order cost * tax rate + shipping cost
c) If standard shipping
Shipping cost = 5.75
Else
Shipping cost = 23.65
For each T-shirt on the purchase order:
Order cost = order cost + T-shirt cost + shipping cost
Total purchase order cost = order cost * tax rate
d) If special delivery
Shipping cost = 5.75
Else
Shipping cost = 23.65
For each T-shirt on the purchase order:
Order cost = order cost + T-shirt cost
Total purchase order cost = order cost * tax rate + shipping cost