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.

 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. Show the Mailing lists on Internet? Another exciting aspect about E-mail is that you can find groups of people who share your interests-whether you are inclined toward games

Can you give an example of what might be best suited to place in the application_Start and Session_Start subroutines? Application Start - We can place code to initialize var

Describe the additional characteristics needed for an e-commerce server? E-commerce services need dynamic configuration abilities and seasonal and every day service configurat

How to calculate the flowchart

Explain about the term Middleware. Middleware is the term frequently used to explain the application or business logic present within an application server. Unfortunately, simi

What is a Modem? Modems are fundamentally used to interface digital circuits to transmit information on analogue channels as telephone systems. Modem is from modulator-demodul

Define Grammar of a language. A formal language grammar is a set of formation rules which describe that strings formed from the alphabet of a formal language are syntactically

Let us review the operation of the stack within the 68HC11, the stack is a defined area of RAM which is last in first out register (LIFO) . Access to the stack is made via a stack

Find the boolean expression for the logic circuit shown below. Ans. Output of Gate-1 (NAND) = (AB)' Output of Gate-2 (NOR) = (A'+B)' Output of Gate-3 (NOR) = [(AB)' + (

Q. Device drivers in Windows system? In Windows system device drivers are implemented as dynamic link libraries (DLLs). This scheme has advantages which DLLs comprises sharea