Question
Part 1 (30 points): Modify and reuse the code from assignment 2 (class LinkedList.java) to develop a new class, called Queue.java, to implement queue operations
Part 1 (30 points):
Modify and reuse the code from assignment 2 (class LinkedList.java) to develop a new class, called Queue.java, to implement queue operations [enqueue(e), dequeue(), front(), size(), isEmpty()]we discussed from Chapter 20. See slides 10 - 13, file Chapter-20-Part4-Queues. The implementation of class Queue must use Integer (int) type since we need queue objects in part II below. Please do not use code you may find online, it is easier to develop your own class for our assignment to meet its specific requirements. Also, do not use inheritance; just keep it simple, one stand-alone Queue class that uses linked-list implementation with Integer type.
Next, develop a simple test program, called TestQueue.java, to test all queue operations listed above and included in your own class Queue.java. This is similar to the test programs we developed in previous assignments, using integer type data. The test program must test every operation in class Queue with clear outputs, and using meaningful labels and prompts to show the queue content before and after each operation. Make sure you allow the user to enter the queue content (i.e., interactive testing, you may use a menu system in your code). Chapter-23-Part2-Advanced-Radix-Search. Please DO NOT hard-code test data.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started