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

Can a .net web application consume java web service, Can a .NET web applica...

Can a .NET web application consume Java web service? Yes Offcourse.Actually Webservices are independent  to language. It depends on WSDL and SOAP. so any single can develope t

Illustration of a memory organization, Q. Illustration of a memory organiza...

Q. Illustration of a memory organization? Let's consider an illustration of a memory organization as displayed in Figure below in that main memory can store 32K words of 12 b

Floating-point processing and instruction encoding, write a program that e...

write a program that evaluate the following arithmetic expression: ((A+B) /C) * ((D-A)+E) assign test value to the variable and display the resulting value.

What is electronic payment system, What is electronic payment system? E...

What is electronic payment system? Electronic payment systems are alternative cash credit payment methods using various electronic technologies to pay for products and services

Variable or compound expression - unification algorithm, Variable or compou...

Variable or compound expression - Unification algorithm: Here some things to note regarding this method are:  (i) There if really trying to match a constant to a different

Poor technology or system requirements definition, Poor Technology or Syste...

Poor Technology or System Requirements Definition - Information System Previously we looked at product design and specifically the importance of requirements capture as part o

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

Dna sequences, The dataset provided in this assignment contains a collectio...

The dataset provided in this assignment contains a collection of real DNA sequences. The number of true binding sites is quite limited and that makes the problem challenging. In ma

Explain about the client/server computing, Explain about the Client/Server ...

Explain about the Client/Server Computing? Although there are different various configurations, various hardware and software platforms and even various network protocols into

Challenges facing operations managers - information systems, Challenges Fac...

Challenges Facing Operations Managers - Information Systems While information systems should be seen as tools that enable better performance their implementation also brings a

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