Question: Based on the results below the code i have now, it shows that the server keeps telling the customer that the order is ready to

Based on the results below the code i have now, it shows that the server keeps telling the customer that the order is ready to collect whenever there is a drink in the tray area why is that, is there any solutions or suggestions to counter this problem. Welcome to the Virtual Caf! Please enter your name:
Enter your name: a
Hello a! You can order tea or coffee, check status, collect, or exit.
Enter a command ('help' for options): order 3 tea 3 coffee
Enter a command ('help' for options): [Server]: Order received for a: 3 teas
[Server]: Order received for a: 3 coffees
order status
Enter a command ('help' for options): [Server]: Order status for a:
[Server]: -1 tea(s) in waiting area
[Server]: -1 coffee(s) in waiting area
[Server]: -2 tea(s) currently being prepared
[Server]: -2 coffee(s) currently being prepared
[Server]: Your entire order is ready to be collected!
[Server]: Your entire order is ready to be collected!
[Server]: Your entire order is ready to be collected!
[Server]: Your entire order is ready to be collected!
Connection to the server lost.
Based on the results below the code i have now,

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!