Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Online Market Research Cost Effective Searching Of The Internet And Online Databases

Authors: John F. Lescher

1st Edition

0201489295, 978-0201489293

More Books

Students also viewed these Databases questions