/* Implementation of the DoubleStack class. */ #include "DoubleStack.hh" #include // Default constructor DoubleStack::DoubleStack() { topIndex = -1; } bool DoubleStack::isEmpty() { if (topIndex == -1) { return true; } else { return false; } } bool DoubleStack::isFull() { if (topIndex == MAX_SIZE-1) { return true; } else { return false; } } void DoubleStack::popAll() { topIndex = -1; } void DoubleStack::push(double x) { topIndex++; data[topIndex] = x; } double DoubleStack::top() { // Modify code here return 0; } void DoubleStack::pop() { // Modify code here }