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

  Given the following data definition classpublic class exam

given the following data definition classpublic class exam private static int totalpublic static void settotalint t

  Writing a program that parses

The programming project involves writing a program that parses, using recursive descent, a GUI definition language defined in an input file and generates the GUI that it defines.

  Develop a graphical user interface

For this assignment, you are required to develop a Graphical User Interface (GUI) Java Program to demonstrate you can use Java constructs including input/output via a GUI.

  String that contains at least five letters

Write an application that prompts the user for a String that contains at least five letters and at least five digits. Continuously reprompt the user until a valid String is entered. Display a message indicating whether the user was successful or did ..

  A program that reads in two integers typed on the keyboard

Write a program that reads in two integers typed on the keyboard and outputs their sum, difference, and product. Must compile correctly in Eclipse. Here is what I have done, but its wrong.

  Method called wordlengths that accepts a scanner

Write a method called wordLengths that accepts a Scanner representing an input file as its argument. Your method should read from the given file.

  Bilinear and nearest neighbour algorithm in java

How to do bilinear and nearest neighbour algorithm in java. Show how to eliminate change in pixel aspect ratio in java.

  Implement a shopping cart class with user interface

project will be to implement a shopping cart class with user interface (UI) that contains main() in Net Beans. The UI class will be used to perform user input/output and to invoke the appropriate methods of shopping cart class. When your program star..

  Write a void function this passed three integers

1. Write a void function this passed three integers by reference. The function should rearrange the parameter values so that the first parameter will get the smallest value; the second parameter the middle value; and the third parameter the largest v..

  Compare the average completion times of all jobs

Compare the average completion times of all jobs for each scheduling algorithm. Output the details of each algorithm's execution. You need to show which jobs are selected at what times as well as their starting and stopping burst values. You can choo..

  The game of pig

Write a program that allows a single player to practice the game (that is, there will be no opponent, just a single player). Play 5 turns in the game to get a total score for the player. Refer to the sample output below for a detailed example.

  Implement a personal scheduler windows application

Implement a personal scheduler Windows application - Entries can be enabled and disabled: Enabled schedule entries appear dark in the main window, and disabled entries appear grayed out in the list.

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