Problem

In Project 5 you created a queue that does not allow duplicates. In this project you will...

In Project 5 you created a queue that does not allow duplicates. In this project you will create a deque that does not allow duplicates. The function of the deque’s operations addToBack and addToFront should be analogous to the changed enqueue method in Project 5. Add two operations, moveToBack and moveToFront.

Create an interface NoDuplicatesDequeInterface that extends DequeInterface. Then write a linked implementation of NoDuplicatesDequeInterface. Finally, write a program that adequately demonstrates your new class.

Consider a new kind of queue that allows only a single copy of an object in the queue. If an object is added to the queue, but it is already there, leave the queue unchanged. This queue has another operation moveToBack that takes an object in the queue and moves it to the back. If an object is not in the queue, the operation adds it at the back of the queue. Create an interface NoDuplicatesQueueInterface that extends QueueInterface. Then write an array-based implementation of NoDuplicatesQueueInterface. Finally, write a program that adequately demonstrates your new class.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
Solutions For Problems in Chapter 11
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT