Java Algorithm Programming Question Implement the ADT queue by using a circular linked list. Recall that this list has only an external reference to its last note. Example Output: Create a queue:...


Java Algorithm Programming Question<br>Implement the ADT queue by using a circular linked list. Recall<br>that this list has only an external reference to its last note.<br>Example Output:<br>Create a queue:<br>isEmpty () returns true<br>Add to queue to get<br>Joe Jess Jim Jill Jane Jerry<br>isEmpty () returns false<br>Testing getFront and dequeue:<br>Joe is at the front of the queue.<br>Joe is removed from the front of the queue.<br>Jess is at the front of the queue.<br>Jess is removed from the front of the queue.<br>Jim is at the front of the queue.<br>Jim is removed from the front of the queue.<br>Jill is at the front of the queue.<br>Jill is removed from the front of the queue.<br>Jane is at the front of the queue.<br>Jane is removed from the front of the queue.<br>Jerry is at the front of the queue.<br>Jerry is removed from the front of the queue.<br>The queue should be empty: isEmpty() returns true<br>Add to queue to get<br>Joe Jess Jim<br>Testing clear:<br>isEmpty() returns true<br>Add to queue to get<br>Joe Jess Jim<br>Joe is at the front of the queue.<br>Joe is removed from the front of the queue.<br>Jess is at the front of the queue.<br>Jess is removed from the front of the queue.<br>Jim is at the front of the queue.<br>Jim is removed fron the front of the queue.<br>The queue shou ld be empty: isEmpty() returns true<br>The next calls will thraw an exception.<br>Exception in thread

Extracted text: Java Algorithm Programming Question Implement the ADT queue by using a circular linked list. Recall that this list has only an external reference to its last note. Example Output: Create a queue: isEmpty () returns true Add to queue to get Joe Jess Jim Jill Jane Jerry isEmpty () returns false Testing getFront and dequeue: Joe is at the front of the queue. Joe is removed from the front of the queue. Jess is at the front of the queue. Jess is removed from the front of the queue. Jim is at the front of the queue. Jim is removed from the front of the queue. Jill is at the front of the queue. Jill is removed from the front of the queue. Jane is at the front of the queue. Jane is removed from the front of the queue. Jerry is at the front of the queue. Jerry is removed from the front of the queue. The queue should be empty: isEmpty() returns true Add to queue to get Joe Jess Jim Testing clear: isEmpty() returns true Add to queue to get Joe Jess Jim Joe is at the front of the queue. Joe is removed from the front of the queue. Jess is at the front of the queue. Jess is removed from the front of the queue. Jim is at the front of the queue. Jim is removed fron the front of the queue. The queue shou ld be empty: isEmpty() returns true The next calls will thraw an exception. Exception in thread "main" EmptyQueueException at CircularLinkedQueue.getFront(CircularLinkedQueue.java:55) at Driver.testQueue0perations(Driver.java:76) at Driver.main (Driver.java: 12)

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here