Question: Write And Test An Array Class [ StaticArray . h and StaticArray.TestDriver.cpp ] Write a data structures template. The resulting template can be used in
Write And Test An Array Class StaticArrayh and StaticArray.TestDriver.cpp
Write a data structures template. The resulting template can be used in any program in place of a C array.
Requirements. Develop StaticArray.h as you write StaticArray.TestDriver.cpp with class StaticArray, defined and fully tested. Write the public interface exactly as specified below do not add to or change the public interface as specified.
Write the template for an array of values of unspecified type.
Let the capacity be set as part of the template specification, as modeled in the reading.
Include a square bracket getter and a setter, both with index rangechecking, returning whatever value you wish, if out of range.
Include a getter named StaticArray::capacity to return the data structure's capacity.
Initialize all data members to their default values in the constructor. That includes setting the array elements to their default data type.
Do all tests with int double and char Also do all tests with an object, like string Please complete all tests on one data type then move to another data type. DON'T mix each test with all data types!
Do NOT write any other functions in the public interface.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
