Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

*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...

1 answer below »
*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.
Answered Same Day Mar 26, 2020

Solution

Snehil answered on Mar 27 2020
141 Votes
Appointment.class
synchronized class Appointment {
private String name;
private String reason;
private int time;
public void Appointment(String, String, int);
public String getName();
public void setName(String);
public String getReason();
public void setReason(String);
...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here