CoolVector Project

Overview

In this project, you will extend and build on the IntVector data type that we built in class. You should refer to that code during this project (either the paper handout or the code from the class website).

You will create a CoolVector data type that has all the same capabilities as an IntVector but more as well:

What you need to do

The driver program

The driver program maintains two CoolVectors, called a and b, and allows the user to manipulate them in various ways by reading commands from a text file. Each command your driver program must handle has a corresponding C++ member function that you must call, so the driver program does little more than translate commands from the text file into function calls on CoolVectors a and/or b.

The commands your program must handle are: (in the descriptions below, letter will either be a or b in the text files your program reads)

Mostly all you have to add to main.cpp is more if/else statements to handle the other commands. append is already done for you; you can use it as a guide.

Guidelines

Grading

Test Cases

run1.txt output
run2.txt output
run3.txt output
run4.txt output

Hints

If you need assistance implementing the copy constructor, destructor, operator=, or operator<<, see the IntVector code, or try these references: Overloading operator<<
Overloading operator=
Copy constructor