Queue, Computer Engineering

Assignment Help:

A Queue is a FIFO ( rst in, rst out) data structure. Given the following queue interface:

public interface Queue {

int size(); // current queue size

boolean isEmpty(); // true if queue is empty

void enqueue(Object element); // add element at end of queue

Object dequeue(); // return and remove first element.

Object first(); // return (without removing) first element

Object last(); // return (without removing) last element

Iterator iterator(); // element iterator
}

The iterator iterates over all elements of the queue. Operations not allowed on an empty queue shall generate an unchecked exception.

Do the following:

 Create a linked implementation (LinkedQueue.java) of the interface Queue.

Write a test program QueueMain.java, showing how all methods work.


Create Javadoc comments in the code and generate good-looking and extensive

HTML documentation for the interface and the class. All public class members shall be documented.

Note:
 The implementation shall be linked, i.e. a sequence of linked nodes where each node represents an element.


You may not use any of the prede ned classes in the Java library.

 In the report, the HTML pages generated by the classes Queue and LinkedQueue shall be attached. Attach no other HTML pages!
 Check the extra slides before you start.


Related Discussions:- Queue

Explain about data registers, Q. Explain about data registers? The data...

Q. Explain about data registers? The data registers are used just for storing intermediate results or data and not for operand address calculation. Some dedicated address re

What are the mechanisms for implementing i/o operation, What are the variou...

What are the various mechanisms for implementing I/O operations? a) Program controlled I/O b) Interrupts c) DMA

#titlesoftware interface.., draw circuit diagram and the truth table that r...

draw circuit diagram and the truth table that represent demultiplexer

Explain about multidimensional features present in olap, Multidimensional s...

Multidimensional support is very necessary if we are to contain multiple hierarchies in our data analysis. Multidimensional feature permits a user to examine business and organizat

What is a heap, What is a heap? The heap is an area of memory that is ...

What is a heap? The heap is an area of memory that is dynamically allocated. As a stack, this may grow and shrink throughout runtime. Not like a stack, a heap is not LIFO show

What are the digital certificates of hardware computations, What are the Di...

What are the Digital certificates of hardware computations Digital certificates are highly dependent on hardware computations, it is essential that mechanisms are evolved to i

Explain different system calls for performing different task, Write down di...

Write down different system calls for performing different kinds of tasks. The major types of system calls are given as: Process Control: These kinds of system calls are

Explain functional roles of information system, Q. Explain Functional Roles...

Q. Explain Functional Roles of Information System? Functional Roles of Information System 1 Lower Costs - a) Use IT to significantly reduce the cost of business proce

Data can be moved using a ''write:'' statement, Data can be moved from one ...

Data can be moved from one field to another using a 'Write:' Statement and stored in the desired format.  Write: Date_1 to Date_2 format DD/MM/YY.

Differentiate between absolute and relative poverty, Question 1: Using ...

Question 1: Using appropriate diagrams, describe the optimal provision of a private good and a public good. Question 2: Using appropriate diagram, show how there is an

Write Your Message!

Captcha
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