CS 23021 Section 001 Homework Assignment 5 - string and vector

Assignment For this assignment there will be two parts. The first program will deal with various operations that can be done with C++ string objects/variables and the second program wil deal with C++ vector objects/variables.
string Program A file, string.cpp, is provided. Follow the instructions in the comments at the top of the file.

Sample output: 1_string_out.txt, 2_string_out.txt

To get the files and get set up do the following.

First update (if necessary) the shared files:

 cd                                           # Go to home dir
 cd cs23021_shared                            # Go into shared working copy
 svn update                                   # Get update from repository

Then create the directory and copy the files:

 cd                                             # Go to home dir
 cd cs23021                                     # Go into your working copy
 svn mkdir HW_string                            # Make dir for string HW
 cd HW_string                                   # Go into new dir
 cp ../../cs23021_shared/HW_string/string.cpp . # Copy from shared to current dir 
 svn add string.cpp                             # Add to versioning
 svn commit -m "set up for string hw done"      # Commit

Work through the different parts of the program as giving in the string.cpp file itself.

vector Program A file, vector.cpp, is provided. Follow the instructions in the comments at the top of the file.

Sample output: 1_vector_out.txt, 2_vector_out.txt

To get the files and get set up do the following.

First update (if necessary) the shared files:

 cd                                           # Go to home dir
 cd cs23021_shared                            # Go into shared working copy
 svn update                                   # Get update from repository

Then create the directory and copy the files:

 cd                                             # Go to home dir
 cd cs23021                                     # Go into your working copy
 svn mkdir HW_vector                            # Make dir for vector HW
 cd HW_vector                                   # Go into new dir
 cp ../../cs23021_shared/HW_vector/vector.cpp . # Copy from shared to current dir 
 svn add vector.cpp                             # Add to versioning
 svn commit -m "set up for vector hw done"      # Commit

Work through the different parts of the program as giving in the vector.cpp file itself.

Requirements The general program requirements apply.
Turning In Do the following:
  • Work through all parts of the two programs and commit your final programs to the repository.