Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

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.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93106321

Have any Question?


Related Questions in Computer Engineering

Give an example of a merger or acquisition where technology

Give an example of a merger or acquisition where technology contributed to its failure to produce desired outcomes. What reasons caused the failure? What actions might have helped ensure success?

Question need to summarize 2 articles on banking data

Question: Need to summarize 2 Articles on Banking DATA Breach (2 pg per article) - Provided Need 2 Implementations on those articles (2 implementation per article & 2 page for each implementation) - How can it be improve ...

In fostering understanding of utilizing big-oh notation in

In fostering understanding of utilizing Big-Oh notation in an application, please provide a simple java code segment that illustrates how Big-Oh can be utilized to pinpoint performance problems.

In recreational mathematics a magic square is an

In recreational mathematics, a magic square is an arrangement of distinct numbers (i.e. each number is used once usually integers, in a square grid, where the numbers in each row and in each column, and the numbers in th ...

Please help with anbspfunctionnbspcodesymbol to convert

Please help with a function  codeSymbol , to convert each mark to a symbol (A, B, C, D, E, F) and a code (7,6,5,4,3,2,1) according to the table below. And call it in the main function. Use the table below to determine th ...

Suppose you want to represent graphs where the number of

Suppose you want to represent graphs where the number of nodes is unknown in advance, and the nodes IDs are arbitrary (not contiguous). You want the following operations to be performed efficiently: Add a node. Remove a ...

Round robin rr jobs are processed using a fixed time-slice

Round Robin (RR): Jobs are processed using a fixed time-slice. The jobs are initially kept in a queue based on the order of arrival. The job at the front of the queue is removed and served similar to the FIFO algorithm. ...

String c is considered to be an interleaving of strings a

String C is considered to be an interleaving of strings A and B if it contains all (and only) the characters of both A and of B and their respective order is preserved in C. For example, C = aacabbaa is an interleaving o ...

Consider a tcp connection between two hosts that are 400

Consider a TCP connection between two hosts that are 400 miles away from each other (propagation delay is 100 miles per msec.). Assume that there is no error or loss in this communication and the receive window size is s ...

Software engineeringeach of the following heuristics helps

Software Engineering: Each of the following heuristics helps make a good module according to some modularity principle. Identify the principle for each letter. Modularity principles: Principle of Small Modules Principle ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As