Grace Hopper Center

CSC 223 Weekly Assignments: Week 3

CSC 223


Overview

This week we will finish Chapter 8: Queues.

Thursday and Friday, February 19th and 20th

Classwork / Homework / Evaluation

To bring closure to our study of the queue ADT, we will implement a simulation of a line (or as they say in England, a queue ;-) at a grocery story.

Grocery Store Queue Simulation

Input

A text file containing the names of shoppers, SHOPPERS.TXT containing a list of shoppers, one per line.

Output

A simulation of the shoppers in the input file entering and leaving the grocery store checkout line in a random order.

A sample run of the program might produce output like this:

Sean gets in line.
Eleanor gets in line.
Sean finishes checking out.
Jake gets in line.
Anupama gets in line.
Conrad gets in line.
Eleanor finishes checking out.
Toby gets in line.
Jake finishes checking out.
Anupama finishes checking out.
...

You can write this program in any language that I can run on my Debian Trixie based workstation. (I know which language I would choose, just saying! ;-)

1A pairs for this project are:

Nikita and Sean
Gabriel and Abi
Rockwell and Brendon
Eleanor and Alex

3B pairs for this project are:

Dylan and Gabriel
Donovan and Alessandra
Jake and Conrad
Anupama and Noah

Blu and Toby will work with Liam on the linear data structures library for BDS C.

Presentations and code will be evaluated using our CSC 223 Pair / Group Presentation Rubric.

Tuesday and Wednesday, February 17th and 18th

Classwork / Evaluation

Today during class pairs will present the chapter sections assigned last class, and share their working implementations of the code from the section. I will aggregate these into a single location and share them with everyone. Pairs will earn an A only for code that I can compile in our Altair 8800 environment running CP/M.

Homework

Read Section 8.5: Applications of Queues and complete the exercises at the end of the chapter on pages 277 to 278.