Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Consider a toString method for a queue that would create and return a string tha

ID: 3725783 • Letter: C

Question

Consider a toString method for a queue that would create and return a string that nicely displays the contents of the current queue. 1. a. b. c. d. Design, code, and test the toString method for the ArrayBndQueue Design, code, and test the toString method for the ArrayUnbndQueue Design, code and test the toString method for the LinkedUnbndQueue Design, code and rest a toString method for the CircLinkedUnbndQueue 2. Design a QueueTester that tests the functionality of each of the queues. a. Test for exceptions (empty, full, etc) b. Test for integrity (adding, removing, removing the last element, etc) C. Use the toString method to show contents at different steps d. You may choose an ITD, or not. If you have a sequential test, make sure your tests are comprehensive

Explanation / Answer

1. Assuming each enqueued object already provides its own reasonable tostring method that you can invoke from the queue's string method.

Design, code, and test a tostring method for the LinkedUnbndQueue class.

2.

You may choose an ITD or not. If you have a sequential test, make sure your tests are comprehensive.