SUNIL GUTTA

SUNIL GUTTA

  • NA
  • 1k
  • 394k

java program using linked queue ?? any experts

Oct 16 2013 3:09 PM
Hi

I need to create a LinkedQueue program that is a simulation of a Dentist.

I need a patient class declare which has the description of customer and what work needs to be done to the patient (methods).

Ex. Emma Lawyer(Description) 10:00 (Arrive Time) Cleaning (method)

Next, I need a Dentist Class. There is only ONE dentist so:

-The Dentist reads in a patient in order of time arrived.

-If Queue is not empty, than the patient is fetched and dental work is done in the following way:

If the patients service needs : Cleaning (30 min), Checkup (15 Minute), ToothExtract(30), Braces(45)

Each patient comes to the dentist with an arrival time and leave time is computed after getting their dental work done; however leave time = waiting time + service time (which is the numbers in the dental work); waiting time is computed using the previous patient's leave time minus the current patient's arrival time.

Example that needs to be printed out at the end:

Name Description Arrival Time Dental Work Wait Time Leave Time

1st patient- Emma Lawyer 10:00 Cleaning 1030

2nd patient - Jose Teacher 10:10 Checkup 20 Minutes 1045

3rd patient - Rose Programmer 10:30 Braces 15 minutes 11:30


Is this possible ?? Can anyone please ??


Ty sory for the trouble