A method to generate a number of elements between two given


QUEUE - java, plz read the Q carefully and i want all the methods & use simple java language, netbeans 8.1 or 8.2

1. Create a Queue class based on MyLinkedList class. Use this class in the following:

2. Create a new Java Application that has the following methods:

1. A method to generate a number of elements between two given values and save them in a queue

2. A method to print a queue (10 elements per line). The original queue should remain as is after the print

3. A method to return the number of elements on the queue.

4. A method to return if the queue is empty or not.

5. A method to search for a value in a queue. The queue should remain the same after the search is finished.

6. A method to exchange the first element and the last element in a queue (a switch/swap).

7. A method to check if a queue is included in another queue (q1 is included in q2 if q1 is a sub-queue of q2). q1 and q2 should remain as they were originally.

8. A method peekLowestElement to return the smallest element. The original Queue should remain unchanged.

9. A method peekHighestElement to return the largest element. The original Queue should remain unchanged.

10. A method to inverse a queue.

11. A method to make a copy of a queue into a stack (the original queue should remain as is).

In the main method test all your methods including the following cases:

Create 2 queues q1 and q2

Insert 23 integers between 20 and 60 (do not insert duplicates) into q1.

Insert 35 integers between 10 and 80 (do not insert duplicates) into q2.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: A method to generate a number of elements between two given
Reference No:- TGS02912307

Expected delivery within 24 Hours