Please explain how the pseudocode and chart are analyzed.
*Pseudocode
function totalOrder (lineItemPrice: Array,
lineItemQuantity : Array,
saleTaxRate : Double)
returns double
Create variable Double : subtotal
for (index = each item in lineItemPrice)
lineItemTotal = lineItemPrice[index] * lineItemQuantity[index]
subtotal = subtotal + lineItemTotal
end loop
return calculateSubtotal (subtotal, salesTaxRate)
end function
Problem lineItemPrice lineItem Quantity saleTaxRate Return amount
1 [5.50, 3.00, 2.25] [12, 3, 10] 5%
2 [5.50] [5] 5%
3 [] [] 5%