Vectors

  1. Vectors, Procedural. Study automcompletion with Intellisense available in MSVS described here. As you work on the below project, demonstrate to the lab instructor automatic code completion with either standalone variables or structure member variables.

    Create a project titled Lab12_VectorsProc. Implement the dynamically expanding and contracting container functionality described in previous labs using vectors. In the main() function, you may declare the vector to hold the integers input. Specifically, your program has to support this dialog:

    enter operation [a/r/q] and number: a 5
    your numbers: 5
    enter operation [a/r/q] and number: a 8
    your numbers: 5 8
    enter operation [a/r/q] and number: r 8
    your numbers: 5
    enter operation [a/r/q] and number: a 3
    your numbers: 3 5
    enter operation [a/r/q] and number: a 12
    your numbers: 3 5 12
    enter operation [a/r/q] and number: q
    
    Hint: use iterators for number removal. Refer to this code for example usage.

  2. Vectors, Object-Oriented. Create a project titled Lab12_VectorsOO. Re-implement the above functionality using the the following class definition.
Make sure your programs adhere to proper programming style. Submit your projects to the subversion repository. Do not forget to verify your submission on the web.