Question: Using JAVA Objective: Simulate a line of people at the DMV Create an Appointment class that will hold all the information about an appointment (name,

Using JAVA

Objective: Simulate a line of people at the DMV

Create an Appointment class that will hold all the information about an appointment (name, reason, time)

Create an AppointmentQueue class that will hold all of the appointment objects

The queue must sort the appointments to be ordered by time

The earliest appointment should come off the queue first

In your main class:

Read in the text file containing the appointment data

Create Appointment objects for each entry in the file and add them to the appointment queue

Prompt the user to enter their name and let them know if they can be seen for their appointment yetThe criteria to be seen for their appointment is:

Everyone that had an appointment time before them must have already been seen

They must have a scheduled appointment

If they can be seen, remove them from the queue because theyve already been helped

Also print out to the screen that theyve been helped

After someone has been seen, prompt for the next person.

Text file that contains data is called DMV_APPOINTMENTS

the data contains is as follows

Jameson,ID,600

Johnson,ID,700

Stevenson,Registration,730

Anderson,DL,630

Jones,ID,645

Franklin,Registration,745

Roosevelt,DL,615

Nicholson,Registration,800

Blackwell,DL,715

Reynolds,DL,815

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!