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
Example of ANN - artificial intelligence: ANNs look like this:   Notice that the x, w, z and y represent actual valued weights and that every the edges in this graph

What is a Table attribute? The table's attributes verifies who is responsible for maintaining a table and which types of access are permitted for the table.  The most signific

1. Start to make the verification point. 2. In the confirmation Point Name dialog box, select Apply wait state to confirmation point. 3. Type values for the following option

Differentiate between exception and validation testing. - Validation testing is done to test the software in conformance to the needs specified. It aims to demonstrate that the

shell script to find whether the given number is Armstrong or not

Q. What is Small Computer Systems Interface? The other well-liked way is to connect a disk drive to a PC by a SCSI interface. Common drive choice for high-end workstations or s

What are the Main aspects available in all word processors -  Ability to set page size and page orientation -  Ability to change font size and font style (for example Arial,

Tree (recursive definition) A tree is a finite set of one or more than one nodes such that. (1) There is a specially designated node known as the root. (2) The left over

Q. What is Block size of cache memory? Block Size: Block size means unit of data (few memory words) exchanged between main and cache memory. As block size increases from very

Write an academic report on a significant software security exploit you have studied. Your report should include details such as, for example: The nature of the software vuln