CS 311 Spring 2008  >  Assignment 5

CS 311 Spring 2008
Assignment 5

Assignment 5 is due at 5 p.m. Tuesday, April 8. It is worth 20 points.

Procedures

E-mail answers to the exercises below to ffggc@uaf.edu, using the subjectDA5”.

Exercises (20 pts total)

Exercise A — “Smart Array” Class Template

Purpose

In this exercise, you will write a smart-array class. The class will be somewhat smarter than SArray, from Assignment 2; in particular, the array will be resizable. It will also be exception-safe and efficient.

Key to this assignment is exception safety. Make sure that exceptions thrown by value-type operations are properly handled, and that all safety guarantees are documented.

And as always, make your code high quality.

Instructions

Implement a C++ class template that manages and allows access to a resizable array. The type of items in the array should be specified by the client. Be sure to follow the coding standards. All standards now apply!

Test Program

I have written a test program: seqt_test.cpp. If you compile and run your package with this program (unmodified!), then it will test whether your package works properly.

Do not turn in seqt_test.cpp.

Reminders


CS 311 Spring 2008: Assignment 5 / Updated: 2 Apr 2008 / Glenn G. Chappell / ffggc@uaf.edu Valid HTML 4.01!