Objects with Dynamically Allocated Members

  1. Variable Size Array with Classes, Testing. Study Code and Object Definition Windows of Microsoft Visual Studio described here. As you work on the below project, demonstrate to the instructor the usage of this feature.

    Create a project titled Lab11_VarArrayTest. Implement the dynamically expanding and contracting integer array described in the second part of the previous lab as a class. You should use this class definition. The class attributes are a pointer to the dynamically allocated array array and the array size size This class contains two groups of methods:

    Your code should work with this test program. It is designed to test your implementation of varArray class.

    You are free to modify the class and the test program but you cannot change the principle of dynamic allocation of the array (i.e. you cannot make the member variables automatic) or remove testing of all the methods from the test program.

  2. Variable Size Array with Classes, Implementation. Create a project titled Lab11_VarArrayClasses. Using the class implemented in the first part of this lab, implement the functionality of the second part of the previous lab. That is, write a program that asks the user to input numbers to add to and remove from the array and then prints its contents in the increasing order.
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.