CS-2852 Data Structures Week 5, Class 3 – Testing and Recursion Queue Implementing finite queues Binary Search Recursion Tomorrow – Quiz, Lab demos, Lab 5 CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick 1
Quiz Topics Lab 5 reading Stacks and Queues Drawing a UML diagram CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick 2
Implementing Queues What is the disadvantage of implementing a Queue by wrapping an ArrayList? Think (45 seconds) Discuss with neighbor (45 seconds) Volunteer answer (>0 seconds) CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick 3
Implementation Adapter Class A class that wraps another class to meet a particular interface. Linked List Not ArrayList Because … But with an array, we can Circular queue CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick 4
Circular Queue CS-2852 Dr. Josiah Yoder Slide style: Dr. Hornick 5