Do the following pic: Solution Here is the solution for the first 2 problems in the pic: #include using namespace std; template class Dec { public: //hasDuplicate function that returns true if the private data member has an item that appears twice or more in the list. bool hasDuplicate(); //eraseAll function to remove all items which are equal to the item specified in the function parameter. void eraseAll(ElementType element); //isLessThan function to determine if another Dec object is greater than the Dec object itself. //If the summation of all items from the Dec object itself is less than the summation of all //items from another Dec object, return true, otherwise, return false. bool isLessThan(Dec other); //push_second function to add an item after the first item if there are more than one items. void push_second(ElementType element); private: vector dec; }; template bool Dec::hasDuplicate() { for(vector::iterator ot = dec.begin(); ot != dec.end(); ot++) for(vector::iterator it = dec.begin() + ot + 1; it != dec.end(); it++) if(*it == *ot) return true; return false; } template bool Dec::isLessThan(Dec other) { int sum1 = 0, sum2 = 0; for(vector::iterator it = dec.begin(); it != dec.end(); it++) sum1 += *it; for(vector::iterator it = other.dec.begin(); it != other.dec.end(); it++) sum2 += *it; return sum1 < sum2; }.