Question: Write the inputOrders ( ) method in the Deliveries class. Within inputOrders ( ) , use scnr to read pairs of inputs, string currFood and

Write the inputOrders() method in the Deliveries class. Within inputOrders(), use scnr to read pairs of inputs, string currFood and integer currQuantity, until "done" is read from input. Create each Order object with currFood and currQuantity as arguments and append each object to ArrayList orderList.
Ex: If the input is duck 13 quail 9 pear 26 ginger 22 done, then the output is:
Order: duck, Quantity: 13 Order: quail, Quantity: 9 Order: pear, Quantity: 26 Order: ginger, Quantity: 22

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!