Just-in-Time (JIT) Process Improvements
February 11, 2021
BHO6505 (Marketing Management) – The goal of case analysis is to allow you to consolidate what… 1 answer below »
February 11, 2021

CS143 – Lab 2Linked List QueueIntroductionA queue is an ADT that represents an ordered, First-In-First-Out (FIFO) collection.• An ordered collection maintains the insertion order of the elements.• New elements can only be added to the back of the queue.• Existing elements can only be removed from the front of the queue.A queue can be used in real-world modeling, such as keeping track of service requests so that they arehandled in the order they arrived. It can also be used internally in computer functions, such as storingprinter requests in a print queue.The basic methods for a queue are as follows:• enqueue(value) – adds the value to the back of the queue.• dequeue() – removes the next available value from the front of the queue and reports the value.• isEmpty() – reports if the queue is empty.Other convenience methods are usually added:• front() – returns the value at the front of the queue without removing it.• size() – returns the number of values currently stored in the queue.Java’s LinkedList and ArrayDeque concrete classes implement the queue ADT, but they also includemany other methods that do not prevent the access to data that should not be accessible in a purequeue implementation.Lab OverviewIn Lab 2 your task is to create your own generic Queue class using a LinkedList as the underlying datatype (a composition relationship.) This type of relationship allows you to hide LinkedList methods thatare not applicable to a queue.In the Project 2 module you are given a NetBeans project that contains the following classes:• An interface named PureQueue that defines the ADT described above.• A data-management class called Queue that implements the PureQueue interface. (This class iscurrently mostly empty.)• A JUnit test class that tests the Queue class. (Found under TestPackages/cs143.)


“Looking for a Similar Assignment? Get Expert Help at an Amazing Discount!”

 

"Is this question part of your assignment? We Can Help!"

Essay Writing Service
ORDER NOW