Improve the efficiency of their operations

Assignment Help JAVA Programming
Reference no: EM13677510

The fancy new French restaurant La Food is very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of their operations, the Maitre De has hired you to write a program that simulates people waiting for tables. The goal is to determine the average amount of time people spend waiting for tables.

The fancy new French restaurant La Foodis very popular for its authentic cuisine and high prices. This restaurant does not take reservations. To help improve the efficiency of their operations, the Maitre De has hired you to write a program that simulates people waiting for tables. The goal is to determine the average amount of time people spend waiting for tables.

Your program will read in a list of event descriptions from a text file, one description per line.

• Arrival: A party has arrived to eat. Add them to the end of the list of waiting parties (a Queue) and tell them to wait at the bar (where strong drinks are served) until called. This event is described in the following format:

At n name

Here t is the time of arrival (in minutes past opening time), n is the number of people in the party, and name is the name to call when the table is ready.

• Table: A table has become available; remove the party that has been waiting the longest from your list, and seat them. This event is described in the following form:

Tt

Here t is the time the table became available (again, in minutes past opening time),

• Quit: This is a sentinel event indicating the end of the input file. It has the following form:

Q

When the events in the file have been processed, compute and print the average waiting time per customer. If there are still people waiting for tables, print a summary of who is still waiting.

Reference no: EM13677510

Questions Cloud

Determine at what rate is energy being removed : A 150 gram aluminum cup contains 1100 gram of water in thermal equilibrium with the cup at 80°C. Find at what rate is energy being removed
The six strings of a guitar are the same length : The six strings of a guitar are the same length and under nearly the same tension, however they have different thicknesses. On which string do waves travel the fastest? The thickest or thinnest? Why?
Find how much time elapses : A 1.00 kilogram, horizontal, uniform tray is attached to a vertical ideal spring of force constant 190 N/m and a 270 gram metal ball is in the tray. Find how much time elapses between releasing the system at point A and the ball leaving the tray
Two separate methods by which cholecystokinin-leptin act : Explain the two separate methods by which cholecystokinin (CKK) and leptin act on the CNS to restrict food intake. Name one effective (FDA-licensed) drug that reduces food intake, and indicate its mode of action. Why have many other compounds failed ..
Improve the efficiency of their operations : To help improve the efficiency of their operations, the Maitre De has hired you to write a program that simulates people waiting for tables. The goal is to determine the average amount of time people spend waiting for tables.
Compute how much heat went into the gas : A gas expands from 1 m3 to 2 m3 at a constant pressure of 500 Pa. Compute how much heat went into the gas
Consider the waves on a vibrating guitar string : Consider the waves on a vibrating guitar string and the sound waves the guitar produces in the surrounding air. The string waves and the sound waves have the same frequency. Can someone describe why?
Surface distribution of charge on each sphere is uniform : Two identical conducting spheres each having a radius of 0.500 cm are connected with a light 2.40 m long conducting wire. A charge of 66.0 µC is placed on one of the conductors. Suppose the surface distribution of charge on each sphere is uniform. De..
Find how many pellets must be added to water : Lead pellets, mass of each is 0.80 gram is heated to 200°C. Find how many pellets must be added to 480 gram of water that is initially at 20°C to make the equilibrium temperature 25°C

Reviews

Write a Review

JAVA Programming Questions & Answers

  Finding java code error

Indicate in the given code segment if an error occurs. If so, point to whether it is syntax, runtime or logic and how you would fix it.

  Write a program to register students for a college students

write a program to register students for a college. students have names addresses and courses. implement the interface

  Demonstrate your knowledge in a pragmatic way

Summarize everything that we have addressed in the XML Applications course, and provide a mechanism to demonstrate your knowledge in a pragmatic way.

  Java code using jframe

Write a Java code using JFrame. This code needs to manipulate 4 shapes(2 rectangles and 2 squares) in a 400x400 JFrame. This needs to manipulate the shapes in 3 different ways, using 3 different methods. One for translating a shape, one for proportio..

  Write a reference class called ctatrain

writing a reference class that consist of the 2nd and 3rd instance variables below. my class should consist of an array of values in the 2nd instance variable

  Report the last letter of each word in the string

Write a sequence of Java statements that report the last letter of each word in the string.

  Executing stringed musical instrument class

Create and execute a stringed musical instrument class.

  What are the various types of dns servers and their purpose

question 1 what is the role of dns how is it structured and why it is necessary?question 2 what are the different kinds

  Write a program cmsc401 java

Write a program cmsc401.java that receives a sequence of commands (from 1 up to 10000 commands)

  Display an image of an apple on the screen

Display an image of an apple on the screen, then after 3 seconds automatically change the display to an orange.

  Java program simulate a network

Java program simulate a network

  Solution for the problem and mention algorithms

Explain the purpose of the program as detail as possible and develop a solution for the problem and mention algorithms to be used and list data structures to be used in solution.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd