Create a queue class based on mylinkedlist class

Assignment Help Computer Engineering
Reference no: EM132118853

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.

Reference no: EM132118853

Questions Cloud

Write a program that implements the queue : Write a program that implements the queue and simulates customers entering and leaving the queue.
Give an example and explanation of ksvm : Give an original example and explanation of ksvm and kknn(with train,validation and test).
Experiment with different initializations of the parameter : Experiment with different initializations of the parameter used for gradient descent .
How could legislation impact on operations : How could legislation impact on operations within your organisation in relation to innovation, project management
Create a queue class based on mylinkedlist class : A method to generate a number of elements between two given values and save them in a queue.
What are the sizes of tag and index and offset fields : What are the sizes of tag, index, and offset fields (in bits) for a cache of size S Kbytes, a block size of B bytes, and W-way associativity?
Project on medical information systems : 300693 WT FINAL PROJECT ASSIGNMENT - you will have to make good use of your CMS using PHP and MySQL for the content delivery
What information do you need to carry out the proposal : You're called in to consult for a company that's issuing about 100 new wireless mobile devices to selected employees.
Overall do you think globalization is positive or negative : Does it increase standards of living around the world, or suffocate other cultures under an onslaught of Big Macs and Coca Cola?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd