COSC 072: Computer Science I

Project 5
Spring 2011

Due: Monday, May 2 @ 5 PM
10 points

This project involves implementing a Vector ADT using a dynamically-allocated C-style array.

  1. I placed the class definition for Vector<T> on seva, which you can retrieve with the commands:
    seva% cd
    seva% mkdir p5
    seva% cd p5
    seva% cp ~maloofm/cosc072/vector.txt ./
    
    This should copy vector.txt the current directory, which you should use as the basis for vector.h.

  2. Use a dynamically-allocated C-style array to implement the Vector<T> class.

    Documentation: [ html | pdf ]

  3. Test your implementation of the Vector<T> class in main.cc. However, we will use our own main function to evaluate your classes. Consequently, you must not modify the class names or the public interfaces. This would also be an important consideration for any large-scale software project. Our main.cc will include only main.h, so put all necessary includes there. That is, for this project, you must have all pertinent includes for main.cc in main.h. In general, you should not need to declare any additional methods or data members.
Instructions for Electronic Submission:

At the top of the file main.cc (or the file containing the main function), place the following header comment, with the appropriate substitutions:

/*
 * COSC 072 Project 5
 * Name: <your name>
 * ID: <GoCard ID>
 * E-mail: <e-mail address>
 * Instructor: Maloof
 *
 * In accordance with the class policies and Georgetown's Honor Code,
 * I certify that, with the exceptions of the class resources and those
 * items noted below, I have neither given nor received any assistance
 * on this project.
 */

You'll be submitting p5 exactly like you submitted p4. The code for this assignment is p5, and you can submit using the command:

seva% java -jar submit.jar -a p5 -f p5.zip
If you need to include a message about your submission, then place the message in a file named README. Place the README file in the project's directory.