Your software development team was tasked to write lava code

Your software development team was tasked to write lava code to simulate the operations of multiple queues. The following code was produced to instantiate the queue objects.//queue instance # 1 Java.util.Queue q1 = new Java.util.Queue();//queue instance # 2 Java.util.LinkedList q2 = new Java.util.LinkedList();//queue instance # 3 Java.util.Queue q3 = new Java.util.LinkedList(); please comment on the code above, using AT MOST 30 words.

Solution

(i)
java.util.Queue q1 = new java.util.Queue<Customer>();

This instance requires some override methods which of them are
* boolean add()
* boolean offer()
* Customer remove()
* Customer poll()
* Customer element();
* Customer peek();
* int size();
* boolean isEmpty();
* boolean contains()
* iterator method

-----------------------------------------------------------------------------------------
(ii)
Second instance will store Customer objects in linked list manner.
Iterating Customer objects in sequence manner starts from head to tail.

-----------------------------------------------------------------------------
(iii)
Third instance is implementing queue using linkedlist, where insertting and
retrieving customer objects from back and inserting at front.
Basically one must implement methods externally to implement queue operations
using linked list operations and syntax.

 Your software development team was tasked to write lava code to simulate the operations of multiple queues. The following code was produced to instantiate the

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site