The String class that we created in class will make dealing with Strings easier, but we should also have a class to make dealing with arrays easier. For this assignment you will create an array based integer list class called IntVector.
The file int_vector_test.cc contains a program that
allows the user to test adding ints to an array list of ints.
For this assignment, write the IntVector
class. The class should
define three functions:
IntVector
with the specified
initial capacity.AddLast
function, that adds the specified integer to the
end of the IntVector
.Print
function, that prints an IntVector
to the specified ostream
. When printing the list the first
element should be preceeded by a [ character and the last followed by a ]
character. Elements in the vector should be separated with a comma followed
by a space. Note, the last object in the vector should not be followed by
a comma and a space. You can assume that objects in the vector have
overloaded the << operator.Be sure to test your code on multiple examples and on the cs server.
Tar your code in a file that contains your name and submit it on course Inquire site.