Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You will need to call the getNextOrderNum() method to specif must call increment NextOrderNum() after you add each order. 6) Add the following methods to

image text in transcribed
You will need to call the getNextOrderNum() method to specif must call increment NextOrderNum() after you add each order. 6) Add the following methods to FastFoodKitchen. For all but the the code inside the method (we give you the code for the kitchen you some time). The bullet points under each tell you what the public int addOrder (int ham, int cheese, int veggie o Using the values of the parameters, create a new Burger number available o Add this new BurgerOrder to orderList (find the ArrayL O Increment nextOrder Num o Return the order id number of the order you just created public boolean isorder Done (int orderID) o Iterate through order List, checking each order. o If there is an order in the list whose order number match progress, so return false o If there isn't an order in the list that matches orderl, rel private void orderCallout (BurgerOrder order) o For each possible item in an order (hamburgers, Cheeset one of these in the order, call out (i.e., print to console) order private void completeSpecificorder (int orderID) O Find the order in the list with the matching order number o Call out (print to console) that this order is done o If the order is to go, call the orderCallOut' method to ar 0 Remove this order from the list (Find the ArrayList meth private void completeNextOrder () O Find the order at the front of the list index 0) o Call out (print to console) that this order is done o If the order is to go, call the orderCallOut' method to a o Remove this order from the front of the list public int get NumOrders Pending() o Return the number of orders currently in the orderList (F this) You will need to call the getNextOrderNum() method to specif must call increment NextOrderNum() after you add each order. 6) Add the following methods to FastFoodKitchen. For all but the the code inside the method (we give you the code for the kitchen you some time). The bullet points under each tell you what the public int addOrder (int ham, int cheese, int veggie o Using the values of the parameters, create a new Burger number available o Add this new BurgerOrder to orderList (find the ArrayL O Increment nextOrder Num o Return the order id number of the order you just created public boolean isorder Done (int orderID) o Iterate through order List, checking each order. o If there is an order in the list whose order number match progress, so return false o If there isn't an order in the list that matches orderl, rel private void orderCallout (BurgerOrder order) o For each possible item in an order (hamburgers, Cheeset one of these in the order, call out (i.e., print to console) order private void completeSpecificorder (int orderID) O Find the order in the list with the matching order number o Call out (print to console) that this order is done o If the order is to go, call the orderCallOut' method to ar 0 Remove this order from the list (Find the ArrayList meth private void completeNextOrder () O Find the order at the front of the list index 0) o Call out (print to console) that this order is done o If the order is to go, call the orderCallOut' method to a o Remove this order from the front of the list public int get NumOrders Pending() o Return the number of orders currently in the orderList (F this)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions