Answered step by step
Verified Expert Solution
Link Copied!

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 UnitTests_Lab1;
// Data members
// NOTE: All values set to -1 for unit test purposes
Type* mArray = reinterpret_cast(-1);
size_t mSize =-1;
size_t mCapacity =-1;
public:
DynArray(size_t _startingCap =0){
// TODO: Implement this method
mSize =0;
};
~DynArray(){
// TODO: Implement this method
}
DynArray(const DynArray& _copy){
// TODO: Implement this method
}
DynArray& operator=(const DynArray& _assign){
// TODO: Implement this method
}
void Clear(){
// TODO: Implement this method
}
Type& operator[](size_t _index){
// TODO: Implement this method
}
size_t Size() const {
// TODO: Implement this method
}
size_t Capacity() const {
// TODO: Implement this method
}
void Append(const Type& _data){
// TODO: Implement this method
}
void Reserve(size_t _newCapacity =0){
// TODO: Implement this method
}
};

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Professional Microsoft SQL Server 2012 Administration

Authors: Adam Jorgensen, Steven Wort

1st Edition

1118106881, 9781118106884

More Books

Students also viewed these Databases questions