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
Give the Schematic of Interpretation of HLL program and execution of a machine language program by the CPU. The CPU utilizes a program counter (PC) to notice the address of nex

Discuss the primary elements of Supply Chain Management models. Primary Elements of Supply Chain Management Models are discussed in below: They are fundamentally concerned a

Explain the Reference Count The system relates a reference count along with each memory area to point out the number of its active users. This number is incremented while a us

Which digital logic family has minimum power dissipation ? Ans. The minimum power dissipation of digital logic family is CMOS. CMOS being an unipolar logic family, occupy a to

Q. How to convert Binary to Octal and Hexadecimal? Rules for these conversions are simple. For converting binary to octal binary number is splitted in groups of three, that are

draw input and output charectoristics of BJT and justify CE configuration provides large current amplification

Internet:  The Internet, an umbrella term cover countless network and services that comprise a super-network, is a global network of computer networks that was started in the 1

In structure chart whole application is divided into modules (set of program instructions) and modules are designed according to some principles of design. These are: Modularit

Fully Parallel Associative Processor (FPAP):  This processor accepts the bit parallel memory organisation. FPAP has two type of this associative processor named as: Word Org

Q. Show Network Topology in digital system? This deals with the geometrical arrangement of nodes (endpoints consisting of physical devices such as terminals, printers, PCs, and