Programming Project in Java - Assignment Example

Only on StudentShare

Extract of sample
Programming Project in Java

Since, there exist a single cash register and only one customer can access it at given moment. A binary semaphore can be used to control customers waiting to pay from paying together, but would ensure they pay one by one.
Since, customer with smallest order needs to get change to aquireCounter first Waiting Area is implemented as TreeSet which automatically sorts objects, if object implements Comparable interface. Customers just need to check whether they are first in Tree Set to know whether they are eligible to acuire Counter Location, if available.
World.log("Admitted one customer " +customer.getCustomerName() + ", additional space for " + customerSemaphore.availablePermits() + " customers available. Waiting area consits of " + customersWaitingForBurrito.toString());
World.log(serverName + " made " + burritosToMake + " burritos for " + customerToServe.getCustomerName() + ", customer still requires " + (customerToServe.getOrderBurritoCount() - customerToServe.getAcceptedBurritos()) + " burritos."); ...
Download paper

Summary

1. BurritoBrothers - Shop can be shared by multiple customers at a time, with a limit on total number of customers. Counter Semaphore can be used to keep check on number of customers getting entry into Burrito Brothers shop. Per problem counter semaphore should be initialized to 15.
Author : lenore42

Related Essays

Java programming and written exercises
3 pages (753 words) Essay
ECOMMERCE PROJECT MANAGEMENT
6 pages (1506 words) Essay
Java Game Programming, any future
15 pages (3765 words) Essay
critical diference between java and C#
10 pages (2510 words) Essay
Java Graphical user interface (GUI)
3 pages (753 words) Essay
Java Questions
3 pages (753 words) Coursework
Got a tricky question? Receive an answer from students like you! Try us!