Write a C++ Program, Create a template class for a dynamic 1D array. You can model your class off of our Stringclass or the dynamic list class. Changes from Stringclass: 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 Stringclass objects (static) Pointclass objects pointers to Pointclass 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.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 28SA
icon
Related questions
Question
100%

*Can Someone Help me with this, I will be so Grateful. It is due Tommorrow :(**

Write a C++ Program, Create a template class for a dynamic 1D array. You can model your class off of our Stringclass or the dynamic list class.

Changes from Stringclass:

  • 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
  • Stringclass objects
  • (static) Pointclass objects
  • pointers to Pointclass 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.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Randomized Select Algorithm
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning