Topical Information Use C++. The purpose of this project is to test your ability to use templates, dynamic memory (mixed with classes), operator overloading, and libraries effectively in program design. Program Information Create a template class for a dynamic 1D array. You can model your class off of our String class or the dynamic list class. Changes from String class: You won't need an end-of-string element in the array. The element type is now templated. Translation will no longer be necessary. operators - and -= 'might' now make sense (erase element(s)?). ... Show how useful your template array class is by creating arrays of short integers doubles String class objects (static) Point class objects pointers to Point class objects (each allocated on the heap) — all in one test application. Make sure your test application is a good/thorough test of your class. (Your test application might utilize the applyand accumulatefunctions from lecture to facilitate testing. Also note how a typical template test application is structured — using templates to ease development.
Topical Information
Use C++. The purpose of this project is to test your ability to use templates, dynamic memory (mixed with classes), operator overloading, and libraries effectively in
Program Information
Create a template class for a dynamic 1D array. You can model your class off of our String class or the dynamic list class.
Changes from String class:
- You won't need an end-of-string element in the array.
- The element type is now templated.
- Translation will no longer be necessary.
- operators - and -= 'might' now make sense (erase element(s)?).
- ...
Show how useful your template array class is by creating arrays of
- short integers
- doubles
- String class objects
- (static) Point class objects
- pointers to Point class objects (each allocated on the heap)
— all in one test application.
Make sure your test application is a good/thorough test of your class. (Your test application might utilize the applyand accumulatefunctions from lecture to facilitate testing. Also note how a typical template test application is structured — using templates to ease development.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images