Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

As a group, you're going to make software to manage appointments at the DMV. Your program will read in several appointments from a data file

As a group, you're going to make software to manage appointments at the DMV. Your program will read in several appointments from a data file and store them into a queue data structure. Then you'll determine who is next based on the order of their appointment times.
Flow of the program:
1. Read in all the appointments from the data file, create an "Appointment" object for each one, and add each one to an "AppointmentQueue". The data file to read from is here:
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
2. Prompt the user to enter their name and then determine whether or not they are next in the queue
3. If they are next, output to the screen that the DMV will help them now and remove them from the queue. If they are not next, give them a harsh rejection message like the DMV usually does.
4. Keep prompting for the next person until everyone has been helped.
Requirements:
1. You shall create three classes: a main class called "Assignment6", an "Appointment" class, and an "AppointmentQueue" class
2. The Appointment class will hold the information for a single appointment (name, reason, time).
3. The AppointmentQueue class will hold all of the appointment objects. This queue class should at least have "push" and "pop" methods for adding and removing from the queue (more may be needed). The earliest remaining appointment should come off the queue when "pop" is called.
The Hard Part:
Your "AppointmentQueue" class must use a basic array of initial size 5 to hold the appointments. When the "push" method is called, your class must be able to automatically expand the array when needed to fit additional appointment objects.

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_2

Step: 3

blur-text-image_3

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

Discuss the techniques of job analysis.

Answered: 1 week ago

Question

How do we do subnetting in IPv6?Explain with a suitable example.

Answered: 1 week ago

Question

Explain the guideline for job description.

Answered: 1 week ago

Question

What is job description ? State the uses of job description.

Answered: 1 week ago

Question

What are the objectives of job evaluation ?

Answered: 1 week ago

Question

2. Why has the conflict escalated?

Answered: 1 week ago

Question

1. How will you, as city manager, handle these requests?

Answered: 1 week ago