Hi I just need help for the third question. How would you go about coding this? What would the format be? The class name is CoffeeShop. Create a static method called computeOrderMakeTime. This function should take in an array of Orders and an int called numBaristas representing the number of baristas. It will not return anything. d. Calculate the amount of time it will take the passed in number of baristas to make the orders using the following formula: i. (totalMakeTime / numBaristas) + (numOrders % numBaristas) ii. Where totalMakeTime is the sum of every Order’s make, numBaristas is the number of baristas passed in, and numOrders is the number of orders. iii. This function should call lookupMakeTime to calculate the totalMakeTime e. Print out this result as “It will take {time} minutes for {numBaristas} baristas to make these orders.” where {time} is the double value calculated from the formula above and {numBaristas} is the value of the function’s int parameter.
Hi I just need help for the third question. How would you go about coding this? What would the format be? The class name is CoffeeShop.
Create a static method called computeOrderMakeTime. This function should take in an array of Orders and an int called numBaristas representing the number of baristas. It will not return anything.
d. Calculate the amount of time it will take the passed in number of baristas to make the orders
using the following formula:
i. (totalMakeTime / numBaristas) + (numOrders % numBaristas)
ii. Where totalMakeTime is the sum of every Order’s make, numBaristas is the number of baristas passed in, and numOrders is the number of orders.
iii. This function should call lookupMakeTime to calculate the totalMakeTime
e. Print out this result as “It will take {time} minutes for {numBaristas}
baristas to make these orders.” where {time} is the double value calculated
from the formula above and {numBaristas} is the value of the function’s int parameter.
Step by step
Solved in 2 steps with 1 images