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
Write shorts notes on Remote Procedure Call (RPC) The facility whihc was created to help the programmers write client server software is termed as Remote Procedure Call. Within

As we already know, HTML (Hypertext Markup Language) is the language we use to create Web documents. Now we will read "Hello World!" As given below:

Define Minterm and the Maxterm - Canonical Form? Any Boolean expression perhaps expressed in terms of either minterms or maxterms. The literal is a single variable within a t

The typicality of virtual addresses is that: They are longer than physical addresses because total addressed memory in virtual memory is more than actual physical memory.

What are the entities that are swapped out of the main memory while swapping the process out of the main memory? All memory space occupied by the process, process's u-area, and

Q. How do you split Hydrogen and Oxygen gases in industrial electrolysis of water process? Answer:- In oxygen, electrolysis and hydrogen gas are produced at different elec

E-commerce is one of the most significant aspects of the internet. Having emerged recently and growing at a steady state, it becomes essential to look at the advantages and disadva

Q. Explain about Multi tasking environment? Multi tasking uses parallelism by: 1) Pipelining functional units are pipe line mutually 2) Simultaneously employing multiple

Q. Explain Relative Addressing Scheme? In this addressing technique the register R is the program counter (PC) which contains the address of current instruction being executed.

Q. Find the Largest and the Smallest Array Values? Write down a program to find the largest as well as the smallest numbers from a given array. This program uses JGE (jump grea