Rewrite the DMV program using a Linked List Queue. In order to do this, you will need to rewrite the UnorderedList data structure so that input is done at one end of the queue and output is done at the other end of the queue

Recently I had to go to the DMV in order to get new platesfor my car. As I was waiting, holding mynumber, three people came in who had been there earlier in the day. When a clerk was available, they called thesepeople first. This is an example of apriority queue. Certain tasks or peoplehave priority over the others.

Write a DMV program using a queue. Modify the queue so that when someone comes in with the right code, they get moved to the front of the line.

Now, write a test program for the new queue. Use random numbers to simulate when people come into the DMV. There should be a way to determine if the person is a new arrival or someone returning who needs to be moved to the front of the line.

You also need to set up three clerks. When a clerk is free and there is someone in the queue, that clerk will help the next person.

Here are some suggestions:

The program should display how many people were helped andhow many people were still in line when the program ends.

Add the following comments to the beginning of the program.

Name: Your Name

Class and Section: CS 222 01

Assignment: Program Assignment 04

Due Date: See above

Date Turned in:

Program Description: You write a short description of what the program will do

Leave a Reply

Your email address will not be published. Required fields are marked *