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

Explain the recording mode for web vuser script, We use VuGen to make a Vus...

We use VuGen to make a Vuser script by recording a user performing typical business processes on a customer application. VuGen makes the script by recording the activity among the

Arrays of any size, Modify your program so that the line "int numStones = u...

Modify your program so that the line "int numStones = ui.readStones();" in the Game constructor is considered. Depending on the value of numStones read from the user, you should cr

EDC, Conparision of masfet and jfet

Conparision of masfet and jfet

What is the use of isolated i/o configuration, What is the use of isolated ...

What is the use of isolated I/O configuration.  In isolated I/O configuration the CPU has distinct input and output instructions and each of these instructions is associated wi

history of databases , Write a four-page paper how relational data solutio...

Write a four-page paper how relational data solution is applied to presnt Video Store business. 1.       Describe Relational Databases   2.       Write History of databases

What is the different between index and subscript, Subscript refers to the ...

Subscript refers to the array of occurrence, whereas Index shown an occurrence of a table element. An index can only modified using perform, search & set. Require to have an index

Define the types programmable logic devices?, Define the types Programmable...

Define the types Programmable logic devices? There are mostly three types PLDs. These are vary in the placement of fuses in the AND- OR array. 1. ROM- It has fixed AND array

Show the memory hierarchy of computer system, Q. Show the Memory Hierarchy ...

Q. Show the Memory Hierarchy of computer system ? Memory in a computer system is essential for storage and subsequent retrieval of instructions and data. A computer system uses

What is a cgi bin directory, A CGI bin directory is a special directory on ...

A CGI bin directory is a special directory on the server where CGI scripts are allowed to be implemented. Most servers are configured to only permit CGI scripts to be implemented f

New execution of listpermutations, Update the permutation algorithm from th...

Update the permutation algorithm from the text to obtainthe correct list of permutations even if the string haves repeated letters. For example, if you call ListPermutations on 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