

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Instructions for implementing the abstractqueue interface inside the queue class, focusing on the offer, poll, peek, size, isempty, and contains methods. The offer method adds an element to the end of the queue, while poll removes and returns the first element and checks for empty collections. The peek method returns the front element without removing it. The size and isempty methods return the number of elements and a boolean indicating if the queue is empty, respectively. The contains method checks if an element exists in the queue.
Typology: Essays (high school)
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Your task is to implement the ADS AbstractQueue
pointer so you need to find the last element so you can offer the new node. The only specific problem here is the poll () method