Queue, Computer Engineering

Assignment Help:

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.


Related Discussions:- Queue

Determine the address when network address prefixed by 1000, A network addr...

A network address prefixed by 1000 is? A network address prefixed through 1000 is Class B address.

Define situation as transmitter & receiver, The situation when both transmi...

The situation when both transmitter and receiver have to work in tandem is referred to as? The situation while both transmitter and receiver have to work into tandem is termed

How to transmits data in the active message buffer, Q. How to Transmits dat...

Q. How to Transmits data in the active message buffer? int pvm_bcast( char *group, int msgtag ) Transmits data in the active message buffer to a group of processes. msgt

C, usability of union

usability of union

Explain conditions for the critical section problem solution, What are the ...

What are the properties which a data item should possess to implement a critical section? The Critical Section Problem Solution should satisfy the following conditions: 1.

Detail explanation of cryptographic modules, Detail explanation of Cryptogr...

Detail explanation of Cryptographic modules Physical security of the cryptographic modules is also built in order to provide total security of the whole system and protect from

What is the advantages for linux, What is the advantages for Linux? ...

What is the advantages for Linux? Runs on old Hardware Low-Cost Linux is fully customizable in all its components Powerful Linux runs on low-end, cheap hardware

Explain about workstations, Q. Explain about Workstations? The workstat...

Q. Explain about Workstations? The workstations are used for engineering applications like CAD/CAM or other types of applications which need a moderate computing power and rela

Function name or connective symbol, Function name or connective symbol: ...

Function name or connective symbol: Whether if we write op(x) to signify the symbol of the compound operator then predicate name and function name or connective symbol are the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd