working with char vector using array the class fixedvector has been declared and was 4951908

Working with char vector using Array The class FixedVector has been declared and was implemented. Thecode is available here. You want to use additional operationswithin the class, so the function member insert needs to bechanged, as well as two new functions members, find and operator ==need to be added to the class definition and implemented. Considerthe new class definition below, and the new/modified functionsbeing in bold. // Augmented Declaration

template

class FixedVector {

private:

   size_t size_; // number of elements in the datastructure

   const size_t capacity_; // length of thearray

   T* array_; // pointer to dynamically allocatedarray public:

   // Constructors

   FixedVector(size_t arraysize = 0);        // Also serves asdefault constructor

   FixedVector(const FixedVector& input );   // Copy constructor

   ~FixedVector();    // Getters / Setters

   T& at(size_t index);

   T& operator[](size_t index);

   void push_back(const T& value);

   void set(size_t index, const T& value);

   void erase(size_t index);    
size_t find(const T& value);
   size_t insert(size_t beforeIndex, const T&value);


   size_t size();

   bool empty();

   void clear();    // Overloaded Operators

   FixedVector& operator= (constFixedVector& rhs); //Copy assignment    
bool   operator== (constFixedVector& rhs)

}; // Function member to look for value in FixedVector // If value is in the FixedVector, then return the index ofFixedVector that contains

// the value. If size_ is 0 (array is empty) or the value is not inFixedVector, then // return size_ template size_t FixedVector::find(const T& value) { // to be completed } // Function member to insert value in the FixedVector at indexbeforeIndex and return

// beforeIndex // If beforeIndex is between 0 and size_, then insert the valueby pushing all the

// elements to the right of beforeIndex one position to the right,and increment size_ // If size would exceed capacity, then exit with an error // If beforeIndex is >=size_ then display error and do not doany changes to FixedVector template size_t FixedVector::insert(size_t beforeIndex, constT& value) { // to be completed } // Function member to test the equality between twoFixedVectors // It returns true if the two FixedVectors are exactly the same,false otherwise template bool FixedArray::operator== (const FixedVector&rhs){

// to be completed } int main() { // testing the new implementation of a FixedVector // declare & initialize a FixedVector of int with 10elements FixedVector Array1(5); // place 1,5,10 in the array cout Array2(5); Array2.push_back(1); Array2.push_back(5); Array2.push_back(10); if (Array1 == Array2)    cout Attached

"Get 15% discount on your first 3 orders with us"
Use the following coupon
FIRST15

Order Now