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
I''m seeking a challenging professional working position in the field of Information Technology,where I’ll be given the chance to enhance & expand the skills & experience

Write a program, using functions, that calculates the area and perimeter of a rectangle whose dimensions (Length & width) are given by a user.

The first part of the address in electronic mailbox identifies? The first part of address in E-Mail identifies the user's mail box.

Retina - Biometric Computer Security Systems The next security technology that explained in this report is retina security technology which is very famous in a lot of spy movi

Bitwise Operators Like  other  operators  bitwise  operators  have  rules  of  precedence  and  associativity  that determine how expressions involved them are evaluated.

What is SCSI? Ans: It is the acronym for small computer system interface. It refers to a standard bus explained ANSI. Devices such as disks are linked to a computer via 50-wire

Weight Training Calculations -Artificial intelligence: Because we have more weights in our network than in perceptrons, first we have to introduce the notation: wij to denote t

BIOS - Basic Input Output System, Power On Self Test (POST) and Loading Bootloader from the Hard disk drive Boot Sector is being completed by BIOS. It started the system for

Basic elements of  Assembly language: Any Assembly language which consists 3 types of instruction statements that are used to define the program operations: Data secti

Give a solution for readers-writers problem using conditional critical regions. Solution for readers-writers problem using conditional critical regions: Conditional critical