In C++ language, the only instruction that I was given was:/*Write a program to reverse a string using a stack.* This is whatI think my teacher wants but I can’t be sure. Thanks for thehelp!
#include <string>
#include <iostream>
using namespace std;
const int MAX_SIZE = 5;
int stackTop = -1;
class stackType {
private:
int stack[MAX_SIZE];
public:
bool isEmpty()
{
if (stackTop == -1)
returntrue;
else
returnfalse;
}
bool isFull()
{
if (stackTop == MAX_SIZE – 1)
returntrue;
else
returnfalse;
}
//This function checks if the stack is full. itadds an element onto the stack.
OR
OR