CS230 Lab on Queues

Zoom link for cs230 labs

Lab on Queues

Queue Implementations and Queue Applications

Set up

Download the folder named lab8 from your download directory to your Desktop. It should contain a javafoundations folder that you can use in the LinkedQueue implementation task.

Rename this folder to lab8_yourUserName

Task 0: Recursion

On paper, write a recursive solution for the following problems, from the codingbat page:

A. stringClean()

B. countPairs()

Task 1: LinkedQueue Implementation

Write a class, named LinkedQueue, to implement the Queue Interface. This class should be part of the javafoundations package. Use the LinearNode class in your implementation.

Make sure you use your notebook and pencil(s) to draw your pictures!

Steps:

  • In the lab8_yourUserName folder, on your Desktop, create a new Project, named lab8Project. Import the javafoundations package from the downloaded material.
  • Create a new class, named QueueDriver.java to server for testing your Queue implementation.

  • Now you are ready to start your coding in the LinkedQueue.java file.