CS 105 (C++)

Assignment 7: Centipede

I. Overview

In this assignment, you will implement a queue class template, to be used in a simple centipede-style interactive display.  In addition to the use of a template, this project will require the implementation of copy control as well as dynamic memory management.

Note: To allow you to focus on this week's C++ topics rather than on the complexities of data structures, this project is designed around a queue which has a fixed size.  From its first creation and throughout its entire existence, the queue will contain exactly QUEUE_SIZE (specified below) elements.

You will use the existing file a7_main.cpp (download here) to handle interaction and display, and you will complete your Queue template implementation entirely within the file Queue.h.  The given a7_main.cpp should not be modified; doing so may cause your code to work incorrectly during grading.

Your implementation must meet the following requirements:
Note: This assignment's a7_main.cpp file makes use of the ncurses library for display, which requires the option -lncurses (that's the letter l, not the number 1) to g++ during compilation, as shown here:

g++ a7_main.cpp -lncurses -o a7

II. Grading

The following is a list of specific assignment requirements, along with the grade value for each (out of a total of 10 points for the assignment).

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.