Queue, Computer Engineering

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.

Posted Date: 3/14/2013 6:14:21 AM | Location : United States







Related Discussions:- Queue, Assignment Help, Ask Question on Queue, Get Answer, Expert's Help, Queue Discussions

Write discussion on Queue
Your posts are moderated
Related Questions
Q. Explain working of Digital camera? A Digital camera is a camera which captures and stores still images and video (Digital Video Cameras) as digital data in place of on photo

How do I connect to an SQL Server instance that is running on a machine with multiple instances of SQL Server 2000? Ans) Every instance of MS SQL Server must be listening on a d

Describe the term- System analyst Design Once analysis has taken place and systems analyst has some idea of the scale of problem and what needs to be done, subsequent stage is

Any function can be expressed in a truth table.A truth table lists all possible combinations ofinputs and gives the output produced in eachcase.Truth tables must include all combin

Explain Concurrent sharing. Concurrent sharing: Some number of programs may share a file concurrently. While this is the case, this is essential to ignore mutual interferen

Q. Define PVM library routines? In this segment we will give a short description of the routines in PVM 3 user library. Each PVM program must comprise the PVM header file 'pvm3

Tools for Performance Measurement The reason behind these algorithms has been to gain a speed up and improve the performance. After the parallel algorithm has been written and

Define Realization of one flip flop using other flip flops? It is probable to implement a flip flop circuit using any other circuit. Universal block diagram is shown below.

Representation scheme in artificial intelligence: It is not hard to see why logic has been popular representation scheme in AI: In this way, It is easy to represent knowl

What is the difference between field-group header and other field groups? The header field group is a particular field group for the sort criteria.  The system automatically p