Homework 4
1) requires that an ArrayBag object be passed by value or used in a declaration as ArrayBag<type> b = b2; or ArrayBag<type> b( b2); The correctness of the implementation of the copy constructor should be verified. Hint: modify b and make sure the copy, b2, is not changed, or vice versa. 2) requires that if b and b2 are ArrayBag objects then b = b2 executes correctly, this should be verified. Hint: modify b and make sure b2 is not changed, or vice versa. In both cases, you are testing to be sure a deep copy has been created and not a shallow one. Upload your source code files in a zipped folder named CS120YourNameHmk4.zip
|