The fancy new french restaurant la food is very popular for

Assignment Help JAVA Programming
Reference no: EM13378820

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. 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 name Here tis 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 tis 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. Sample Data File Here is a sample data file. You may use this if you like, or you can make up your own. A 3 3 Merlin A 8 2 Arthur Pendragon T 10 A

12 2 Sir Lancelot T 15 A 17 3 The Green Knight T 20 Here is the corresponding output from the simulator program. The user''s input appears in italics.

*** Welcome to the La Food Restaurant Simulator *** Enter data file name: data.txt Please wait at the bar, party Merlin of 3 people. (time=3) Please wait at the bar, party Arthur Pendragon of 2 people. (time=8) Table for Merlin! (time=10) Please wait at the bar, party Sir Lancelot of 2 people. (time=12) Table for Arthur Pendragon! (time=15) Please wait at the bar, party The Green Knight of 3 people. (time=17) Table for Sir Lancelot! (time=20)

** Simulation Terminated ** The average waiting time was: 7.28 The following parties were never seated: party The Green Knight of 3 people Have a nice meal!

Notes

1. Before you begin programming, sketch a high level design of what you want to implement using the UML notation. At the very least, you should have a use case diagram, class diagram (for the Party class) and a sequence diagram.

2. Remember to include comments at the top of your program and 1-2 lines for each function (including pre- and post-conditions). Use javadoccompatible comments.

3. Develop a Queue class. Hint: Check out the sample Queue java source files included with this assignment. Declare a class Party to hold one party.

4. Read one line of the text file, and then process it, before moving on to the next line. Do not try to read in the entire file before processing it. Reading the text file is probably the trickiest part of this assignment.

5. To compute the average waiting time, keep track of the total number of people seated, and keep track of the total time spent waiting using something like this: totmins = totmins + partysize*(tos - toa) wheretosis the time of seating, and toais the time of arrival. Since you need to know both times, this must be done when the party is seated.

6. Start right away! Hand In

1. Listing (print-out) of your nicely formatted program source code (with comments and headers)

2. Print-out of the text file that contains your restaurant information

3. Screen captures of at least three sample runs/scenario output

4. High level design using UML notation (minimum of a use case diagram, a class diagram for Party class, & a sequence diagram)

5. Utilize the submission template provided in the course module.

Reference no: EM13378820

Questions Cloud

1 consumer surplus is nota the value of a good minus the : 1. consumer surplus is nota. the value of a good minus the price paid for it summed over the quantity bought.b. greater
Tqm i just wanted to contribute some additional thoughts in : tqm i just wanted to contribute some additional thoughts in regards to documentation. when i was visiting a warehouse
In your opinion do you feel education is important in : in your opinion do you feel education is important in getting a better job and earning more money. why or why not?do
Indias population is expected to overtake that of china : indias population is expected to overtake that of china within the next decade what differences between these two
The fancy new french restaurant la food is very popular for : the fancy new french restaurant la food is very popular for its authentic cuisine and high prices. this restaurant does
Katie likes sushis and soy milkmher in difference curves : katie likes sushis and soy milkm.her in difference curves are bowed in and towardthe origin and do not intersect the
The local botanical society wants to ensure that the : the local botanical society wants to ensure that the gardens in the town park are properly cared for. the group
The crockett land winery must replace its present : the crockett land winery must replace its present grape-pressing equipment. the two alternatives are the quik-skwish
You are the accountant for the millenium corporation last : you are the accountant for the millenium corporation. last year the company purchased a 2500000 coporate jet to be used

Reviews

Write a Review

JAVA Programming Questions & Answers

  Design and implementation of a hangman game

Design and Implementation of a Hangman game

  1 what makes a program easy to modify2 describe the order

1. what makes a program easy to modify?2. describe the order of magnitude of the following code section using bigo

  Write an application that enables users to enter student ID

Write an application that enables users to enter student ID and three exam scores. Provide a method to compute and returnthe overall exam average.  Provide another method that prints all scores and the average value formatted with no digits to the ri..

  Question a jsp expression can contain any java expression

question a jsp expression can contain any java expression that evaluates to aa string objectb java objectc primitive

  A client or server prepare to use udp in a java application

How does a client or server prepare to use UDP in a Java application? Are there any differences in what the client does and what the server does?

  Aimthe problem and implementing the design using principles

aimthe problem and implementing the design using principles of correct syntax program structure and

  Write an application that extends jframe

Write an application that extends JFrame and that displays a phrase in every font size from 6 through 20.

  Java program to read line of text which ends with period

Write down the java program which will read the line of text which ends with the period, which serves as sentinel value. Show all the letters which occur in the text.

  Explain we have to make a project in java

We have to make a project in java . This is a small deskstop application no specifications given so far . The CD store has CD games and music we can rent a cd or we can buy . This is all we need to develop.

  Afterwards a way for the user to input

And so on and so forth then afterwards a way for the user to input that they finished a particular task on the list. After the user has input that they have finished a particular task the program should be print "Good Job!" or "Keep it up!"

  A java program that will prompt the user to input a file

Write a Java program that will prompt the user to input a file (document) in order to count the frequency of each word. This program will display the frequency of each word sorted alphabetically or by frequency (depending on the preference of the use..

  Create a package called people

Create a second package called ‘task01'. Within this package provide classes which perform the following tasks.

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