Programming Project in Java

Masters
Assignment
Miscellaneous
Pages 8 (2008 words)
Download 0
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.

Introduction

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
Not exactly what you need?

Related papers

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.…
Java programming and written exercises
2. Assume a class Square that implements the interface Comparable. You are required to implement the method compareTo so that squares are compared according to their sides. Part of the Java code has been provided as below. Please complete the code inside the compareTo() method.…
ECOMMERCE PROJECT MANAGEMENT
The first challenge of project management is ensuring that a project is delivered within the defined constraints. The second challenge is the optimized allocation and integration of the inputs needed to meet those pre-defined objectives. (The Gale Group 2002)…
Java Game Programming, any future
The main feature of Java is that it is a platform independent language. The program can be written only once in Java and can be compiled in any operating system. To be simple it is write once, run anywhere. It is an object oriented, multithreaded programming language. (King 2000 ).…
Can teaching the key ideas of object orientation be aided by using visual representations
These modern, re-engineered techniques have had a positive impact in the world of Programming, academic arenas and society at large: programming in teams, maintenance of large systems and software re-use.…