Given the following ADT definition of a stack to use: /** stack (base class) * The basic definition of the Stack Abstract Data Type (ADT) * and stack operations. All declared functions here are * virtual, they must be implemented by concrete derived * classes. */ template <class T> class Stack { public: /** clear * Method to clear out or empty any items on stack, * put stack back to empty state. * Postcondition: Stack is empty. */ virtual void clear() = 0; /** isEmpty * Function to determine whether the stack is empty. Needed * because it is undefined to pop from empty stack. This * function will not change the state of the stack (const). * * @returns bool true if stack is empty, false otherwise. */ virtual bool isEmpty() const = 0; /** push * Add a new item onto top of stack. * * @param newItem The item of template type T to push on top of * the current stack. */ virtual void push(const T& newItem) = 0; /** top * Return the top item from the stack. Note in this ADT, peeking * at the top item does not remove the top item. Some ADT combine * top() and pop() as one operation. It is undefined to try and * peek at the top item of an empty stack. Derived classes should * throw an exception if this is attempted. * * @returns T Returns the top item from stack. */ virtual T top() const = 0; /** pop * Remove the item from the top of the stack. It is undefined what * it means to try and pop from an empty stack. Derived classes should * throw an exception if pop() from empty is attempted. */ virtual void pop() = 0; /** size * Accessor method to provide the current size of the stack. * * @returns int The current size (number of items) on the stack. */ virtual int size() const = 0; }; perform the following tasks by writing code that uses a stack to accomplish the task. You will need to create a stack of the needed type, then use the methods of the stack abstraction (push, top, pop, etc.) to solve the given task asked for. Question 7 (5 points) Given a stack of integers, calculate the sum of the integer values. Also, the stack should still be unchanged after you have calculated the sum Hint: take the items off the stack to sum them up and keep them on a second temporary stack so you can put them all back on after you have calculated the sum. ANSWER FOR NUMBER 7: int sumStackOfIntegers(Stack<int> currentStack) { Stack<int> tempStack; int sum = 0; while(!currentStack.isEmpty()) { int temp = currentStack.top(); tempStack.push(temp); currentStack.pop(); sum += temp; } while(!tempStack.isEmpty()) { int temp = tempStack.top(); currentStack.push(temp); tempStack.pop(); } return sum; } Stack Implementation Given the following linked list implementation of a Stack ADT (this is the same implementation you used in Assignment 10), add the asked for additional member methods to the linked list stack implementation. /** Node * A basic node contaning an item and a link to t ...