Computer Science Homework Solutions
Problem
#103688

Java Program

Do this program in java.  The specs are:
a small take out place call burrito brothers.
(assume the burrito ingredients are infinite)
there are 3 servers that own a private beef area, cheese area and tortilla area,
each server has their own ingredients in infinite supply.
there are 3 counter locations, a cash register and a waiting area that can accommodate up to 15 customers max.
A customer cannot enter the shop if it's filled to capacity.
if the shop is not full a customer can enter.
Each customer will enter the shop with 1 to 20 burritos.
As soon as a server is free the customer that has the shortest order is served next.
A server is either serving a customer or waiting.
Each server will make (at most) 3 burritos at a time for a given customer.
Once a server has obtain all ingredients a burrito can be made.
when a customer's entire order is finished the customer pays a cashier and leaves the shop.
Since there is only one cash register only 1 patron may pay at a time.
However, in the event that a customer's entire order has not been filled by the server at the completion of the current counter visit the customer must reenter the waiting area.
the waiting area is organized by the shortest order next.
Implement a solution to this problem as a Java application using java semaphore classes for synchronization.  
output must include the arrival of each customer and each stat transition: leaving full shop, entering shop with an order of m burritos, customer standing, getting service from server n, paying, and leaving.
Each customer is represented by a corresponding thread and each server in your implementation is also represented by a unique java thread.
All customers and servers exist within a single application.
The finished assignment must include the following:
A methodology and design document.  
A java burrito brothers implementation.
The java Source Code.
Class files.
The system must compile using the command javac *.java.
The system output from a run of your application.

Attached file(s):
Attachments
java program.doc  View File

Attachment Content Summary (Note: view attachment at the above link before purchasing. Actual attachment content may vary slightly from that shown below.)

java program.doc
Do this program in java.  The specs are

a small take out place call burrito brothers.

(assume the burrito ingredients are infinite)

there are 3 servers that own a private beef area, cheese area and
tortilla area,

each server has their own ingredients in infinite supply.

there are 3 counter locations, a cash register and a waiting area that
can accommodate up to 15 customers max.

A customer cannot enter the shop if it's filled to capacity.

if the shop is not full a customer can enter.

Each customer will enter the shop with 1 to 20 burritos.

As soon as a server is free the customer that has the shortest order is
served next.

A server is either serving a customer or waiting.

Each server will make (at most) 3 burritos at a time for a given
customer.

Once a server has obtain all ingredients a burrito can be made.

when a customer's entire order is finished the customer pays a cashier
and leaves the shop.

Since there is only one cash register only 1 patron may pay at a time.

However, in the event that a customer's entire order has not been filled
by the server at the completion of the current counter visit the
customer must reenter the waiting area.

the waiting area is organized by the shortest order next.

Implement a solution to this problem as a Java application using java
semaphore classes for synchronization. 

output must include the arrival of each customer and each stat
transition: leaving full shop, entering shop with an order of m
burritos, customer standing, getting service from server n, paying, and
leaving.

Each customer is represented by a corresponding thread and each server
in your implementation is also represented by a unique java thread.

All customers and servers exist within a single application.

The finished assignment must include the following:

A methodology and design document. 

A java burrito brothers implementation.

The java Source Code.

Class files.

The system must compile using the command javac *.java.

The system output from a run of your application.
Solution
What is this?
By OTA - Overall OTA Rating
Purchase Cost Now
$2.19 CAD (was ~$79.80)
Included in Download
  • Plain text response
  • Attached file(s):
    • java solution.zip
    • assgmn.zip
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Software Application Development - Develop a software application to calculate the area of a circle. The application must accept only one value (radius) and it must display the result in decimal value.
  • RADD, JAD, Prototyping - What is the most effective tool to consider utilizing in today's rapidly developing IT virtual Marketplace? Rapid Application Design and Development, Joint Application Design or Prototyping?
  • OSI model vs no model - What if someone designs a communincation methodology that does not comply with OSI but is compatable with the application layer and the physical layer. What would be teh problems if any? in both Local ...
  • Software Algorithms and Implementation - Please see the attached file. Give the order of each of the following functions. TA(n) = 200(n +4)3 TB(n)= n4 + 300n3log2(n) TC(n)=(2n +3)2log3(n) Suppose that each is the time efficiency fu ...
  • Explain how a Form becomes a window within an application. - Explain how a form becomes a window within an application. Discuss the difference between a modal and modeless form. List an example of when you might want to use each type.
Browse