*Copy of Assignment instructions & DMV file needed are attached*
Objective: Simulate a line of people at the DMV
Use the file attached.
1. Create an “Appointment” class that will hold all the information about an appointment (name, reason, time)
2.Create an “AppointmentQueue” class that will hold all of the appointment objects
The earliest appointment should come off the queue first
3. 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 yet
The 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 they’ve already been helped
- Also print out to the screen that they’ve been helped
- After someone has been seen, prompt for the next person.