Lab #2
La Food Restaurant
CISC 503 – Data Structures & Algorithms
Submitted by: Student Name / ID
Submitted to: Dr. J.T. Lanman
Include a Table of Contents of everything in your submission here. Include a section with breakout of your source code by class and method (recommend using JavaDoc).
Source code listing here….
/*******************************************************************************
* Party Class
*
* Description here….
*
* Preconditions:
* Postconditions:
*
* @authorStudent Name
* @dateDate
* @version 1.0
*
******************************************************************************/
publicclass Party {
// logic here….
publicintgetTime() {
returntime;
}
/**
* Method for accessing the name of the object.
* @return String name
*/
public String getName() {
returnname;
}
/**
* Method for accessing the size of the object.
* @returnint size
*/
publicintgetSize() {
returnsize;
}
}
/*******************************************************************************
* QueueArrayClass
*
* Description here….
*
* Preconditions:
* Postconditions:
*
* @authorStudent Name
* @dateDate
* @version 1.0
*
******************************************************************************/
publicclassQueueArrayimplements Queue
{
// logic here…
publicQueueArray(intmaxsize)
{
// logic here…
}
// Transformers/Mutators
publicvoidenqueue(Object x)
{
// logic here….
}
public Object dequeue()
{
// logic here…
}
publicvoidmakeEmpty()
{
// logic here…
}
// Observers/Accessors
public Object getFront()
{
// logic here….
}
publicint size() { // logic here…. }
publicbooleanisEmpty() { logic here…. }
publicbooleanisFull() { // logic here… }
}
/*******************************************************************************
* Queue Interface
*
* Description here….
*
* Preconditions:
* Postconditions:
*
* @authorStudent Name
* @dateDate
* @version 1.0
*
******************************************************************************/
publicinterface Queue
{
// Transformers/Mutators
publicvoidenqueue(Object x);
public Object dequeue();
publicvoidmakeEmpty();
// Observers/Accessors
public Object getFront();
publicint size();
publicbooleanisEmpty();
publicbooleanisFull();
}
/*******************************************************************************
* Driver Main Class
*
* Description here….
*
* Preconditions:
* Postconditions:
*
* @authorStudent Name
* @dateDate
* @version 1.0
*
******************************************************************************/
import java.io.*;
importjava.text.DecimalFormat;
importjava.util.Scanner;
publicclass Driver {
publicstaticvoid main(String[] args) throwsIOException {
FileReaderinFile = newFileReader("data.txt");
Scanner sFile = newScanner(inFile);
intqSize = 4;
intpTime = 0;
inttTime = 0;
intwaitTime = 0;
intsSize = 0;
doubletotTime;
// logic here…
}
Place screen captures here of at least 3 runs (different scenarios) of your program (be sure they are readable)…
Insert text file data here…
Insert UML design diagrams here (use case, class, and sequence diagram)…
1