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 space switching, Explain Space Switching. Space Switches: Con...

Explain Space Switching. Space Switches: Connections can be made in between outgoing and incoming PCM highways by a cross point matrix of the form demonstrated in figure. How

Compare the cocomo model with the detailed cocomo model, Compare the basic ...

Compare the basic COCOMO model with the detailed COCOMO model. COCOMO having of a hierarchy of three increasingly detailed and accurate forms. -  Basic COCOMO - is a stati

How semaphores implement mutual exclusion, How semaphores implement mutual ...

How semaphores implement mutual exclusion? Mutual-exclusion implementation along with semaphores: Assume that there are n-processes and they share a semaphore, mutex (stan

What is non-repudiation, What is non-repudiation? Non Repudiation: Assu...

What is non-repudiation? Non Repudiation: Assurance that the sender is given with proof of delivery and that the recipient is provided with proof of the sender's identity so th

Features of an expert system, The heart of an experts systems is the ...

The heart of an experts systems is the powerful corups of knowledge that accumulates during system building. The knowledge is explicit and organized to simplify decisio

How linq is beneficial than stored procedures, There are couple of benefit ...

There are couple of benefit of LINQ over stored procedures.   1. Debugging - It is really very difficult to debug the Stored procedure but as LINQ is part of .NET, you can us

Conversion of decimal number 82.67 to its binary equivalent, Conversion of ...

Conversion of Decimal number 82.67 to its Binary Equivalent Ans. Firstly see the integer part 82 and determine its binary equivalent  as The Binary equivalent is (101001

Restore the system defaults, In order to restore the system defaults for al...

In order to restore the system defaults for all changes made with the format statement is Format Reset

Initial considerations in problem solving, Initial considerations in proble...

Initial considerations in problem solving: Three initial considerations in problem solving for easiest(as described in Russell and Norvig):  Initial State  First

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