Answered step by step
Verified Expert Solution
Question
1 Approved Answer
/ / Our implementation of a vector ( simplified ) template class DynArray { / / Gives access to test code friend class UnitTests _
Our implementation of a vector simplified
template
class DynArray
Gives access to test code
friend class UnitTestsLab;
Data members
NOTE: All values set to for unit test purposes
Type mArray reinterpretcast;
sizet mSize ;
sizet mCapacity ;
public:
DynArraysizet startingCap
TODO: Implement this method
mSize ;
;
~DynArray
TODO: Implement this method
DynArrayconst DynArray& copy
TODO: Implement this method
DynArray& operatorconst DynArray& assign
TODO: Implement this method
void Clear
TODO: Implement this method
Type& operatorsizet index
TODO: Implement this method
sizet Size const
TODO: Implement this method
sizet Capacity const
TODO: Implement this method
void Appendconst Type& data
TODO: Implement this method
void Reservesizet newCapacity
TODO: Implement this method
;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started