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

Functional units of a computer system, Functional units of a computer syste...

Functional units of a computer system: Digital computer systems consist of 3 distinct units. These units are as follows:  Central Processing unit Input unit and Output unit.

What is spread spectrum, Question: (a) In order to encourage the develo...

Question: (a) In order to encourage the development mobile technologies, Europe has opted for standardisation. What is the rationale behind this? Provide concrete examples of h

Data can be moved using a ''write:'' statement, Data can be moved from one ...

Data can be moved from one field to another using a 'Write:' Statement and stored in the desired format.  Write: Date_1 to Date_2 format DD/MM/YY.

What is the difference between proc. sent by val and by ref, What is the di...

What is the difference between proc. sent BY VAL and By Ref? BY VAL: Alters will not be reflected back to the variable. By REF: Alters will be reflected back to that variab

Network for digital methods in the arts and humanities, Network for Digital...

Network for Digital Methods in the Arts and Humanities: Europe has seen a signifi cant investment in the digitisation of its cultural heritage as part of the worldwide establi

Why we need parallel programming languages, Q. Why we need parallel program...

Q. Why we need parallel programming languages? The parallel programming languages are created for parallel computer environments.  These are developed either by creating new la

Encryption techniques to ensute secured transaction on net, Two popular enc...

Two popular encryption techniques to ensute secured transactions on the net? 1. Translation table 2. Word/byte rotation and XOR bit masking.

Give a technical description of e-mail, E-mail system is mostly used for se...

E-mail system is mostly used for sending message electronically to group or individuals of individuals in inter and intra office environment. It needs networks to connect them. In

Data dictionary, data dictionary for online banking system in software engi...

data dictionary for online banking system in software engineering

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