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.
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
|