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

C programming, Find out useless nonterminal symbols use c program.

Find out useless nonterminal symbols use c program.

Logic gates required to build a half adder, What are the gates required to ...

What are the gates required to build a half adder ? Ans. The gates needed to build a half adder are EX-OR gate and AND gate as shown below the logic diagram of half adder:

Explain the role of a bus arbiter in a multiprocessor, Explain the role of ...

Explain the role of a bus arbiter in a multiprocessor configuration. Bus arbiter: Which functions to resolve priority between bus masters and allows only one device at a time t

Object oriented and structured oriented programming, What is the difference...

What is the difference among object oriented and structured oriented programming? Ans) ? Object Oriented means programme will be there in terms of Class and Object connection w

Advanced topics of html, HTML is made up of many elements, a lot of them ar...

HTML is made up of many elements, a lot of them are overlooked. Though you can develop a Website with the basic knowledge of HTML, to take benefit of many of the advanced features,

Binary equivalent of the decimal number 368 , What is the binary equivalent...

What is the binary equivalent of the decimal number 368 ? Ans. 101110000 is the Binary equivalent of the Decimal number 368. From Decimal number to Binary number conversioni

Routines which handle dynamic processes, Q. Routines which handle dynamic p...

Q. Routines which handle dynamic processes? number of routines which handle dynamic processes:  int pvm_joingroup( char *group ) Enrolls calling process in a na

Average access time experienced by the processor, Give the formula for the ...

Give the formula for the average access time experienced by the processor in a system with 2 levels of caches. Ans: Formula is for the average access time experienced by the pr

What a hardware uses to calculates cyclic redundancy check, Hardware that c...

Hardware that calculates CRC (Cyclic Redundancy Check) uses: Hardware which computes CRC utilizes shift register and Xor unit.

What controls the screen flow, What controls the screen flow? The SET ...

What controls the screen flow? The SET SCREEN and LEAVE SCREEN statements controls screen flow.

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