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
Explain the importance of computer architecture Studying the architecture implies working on machine language programs. However, this isn't practical when we design a computer

ENCTYPE="application/x-www-form-urlencoded" and in its place use ENCTYPE="text/plain". The subsequent illustration displays a general form which includes some of the commo

Dynamic partitioning: To rise above from difficulties with fixed partitioning, partitioning can be done dynamically, which called dynamic partitioning. Having it, the primary

Describe architecture of WAP gateway. WAP GATEWAY : It is a very unique product giving semi-automatic redirection of HTML documents to WAP compatible mobile phones. Wir

What are the concerns for growth of e-commerce in India?  Government as Facilitator for the growth of e-commerce has taken certain steps: Promotion of competitive teleco

Q. Explain about Memory Buffer Register? Memory Buffer Register (MBR): It's a register that comprises the data to be written in memory (write operation) or it obtains the data

(a)  Explain in a few sentences the difference between a natural frequency and a resonant frequency.  Also clarify why for a specific system or component these frequencies may diff

GRID COMPUTING Grid Computing signifies applying resources of different computers in a network concurrently to a single problem for solving a scientific or technical problem wh

SET 2I OF ALL INTEGERS WITH ZERO IS AN ABELIAN GROUP

Firewalls use one or more of three methods to control traffic flowing in and out of the network:  Packet filtering - Packets (small chunks of data) are examined against a s