Question: Solve using threads in java Simulate a McDonalds Drive. Drivers (threads) submit requests at a waiting queue. A request contains the list of products the

 Solve using threads in java Simulate a McDonalds Drive. Drivers (threads)

Solve using threads in java

Simulate a McDonalds Drive. Drivers (threads) submit requests at a waiting queue. A request contains the list of products the driver wants and a generated id. Cooks take requests from the waiting queue and create orders. An order contains the list of products from the waiter. Cooks put the orders in the second waiting queue. Waiters take the orders from the waiting queue and print on screen "order containing was delivered". In main test the program with 100 clients, each sending 1 requests, 3 cooks and 2 waiters. Solve the concurrent access to shared resources using objects lock, wait and notify

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 Databases Questions!