(Solved) : Partially Completed Need Help Using Runnable Executionservice Prompt Create Order Class Re Q37892864 . . .
Partially completed, need help using Runnable andExecutionService
Prompt:
-
Create an “Order” class to represent an incoming order with thefollowing fields
-
Customer Name
-
Customer Address
-
Pounds of honey
-
-
Create a list to hold incoming orders and populate it withat least 6 orders
-
Create an ExecutorService instance to managethreads
-
Write a Runnable class to process each order by callingthe API to generate a shipping label
-
“Print” each label by printing it to theconsole
-
Although ShippingLabel does have a toString() method, itis not very readable. Print the shipping label in a moreuser-friendly way.
-
Watch out for concurrency problems!
-
-
Keep track of the total cost of allshipments
-
There are many ways to do this – use any mechanism youlike, but make sure that you account for any possible raceconditions
-
-
-
Cleanly shutdown the ExecutorService
-
Print the total cost after all orders have beenfilled
FINISHED STEP 1 AND 2… SCREENSHOTS BELOW. PLEASE HELP WITHREMAINING STEPS WITH THE FOLLOWING INFO:


package shipping public class runOrder implements Runnablet @override public void run) runOrderrun order orderb new Orderc “X”,”X,10: ShippingService shippingService new ShippingService(); ShippingLabel sLabel1 = shippingService.getShippingLabel ( order1.getCustomerName(), orderi . getCustomerAd ShippingLabel sLabel2 shippingService.getShippingLabel(order2 . getCustome rName(), order2 . getCustomerAd ShippingLabel sLabel3 shippingService.getShippingLabel (orde r3.getCustomerName(), order3.getCustomerAd ShippingLabel sLabel4 -shippingService.getShippingLabel(order4.getCustomerName ), order4.getCustomerAd ShippingLabel sLabel5shippingService.getShippingLabel(order5.getCustomerName(), order5.getCustomerAd ShippingLabel sLabel6shippingService.getShippingLabel(order6.getCustomerName(), order6.getCustomerAd ArrayList<object> shippingLabel -new ArrayList; shippingLabel.add(sLabel1); shippingLabel.add(sLabe12); shippingLabel.add (sLabeL3); shippingLabel.add(sLabel4); shippingLabel.add(sLabel5); shippingLabel.add(sLabel6); for (Object label: shippingLabel) Show transcribed image text
Expert Answer
Answer to Partially Completed Need Help Using Runnable Executionservice Prompt Create Order Class Re Q37892864 . . .
OR