Question
stack.h class stack { private: // data members and utility functions public: // for the client to use // Constructor stack(); // Destructor ~stack(); //
stack.h
class stack
{
private: // data members and utility functions
public: // for the client to use
// Constructor
stack();
// Destructor
~stack();
// HOW TO CALL: No argument. Returns Boolean.
// PURPOSE: returns true if stack is empty else false
bool isEmpty ();
// HOW TO CALL: No argument. Returns Boolean.
// PURPOSE: returns true if stack is full else false
bool isFull ();
// HOW TO CALL: Provide the element to be pushed as an argument.
// PURPOSE: if full, calls an emergency exit routine
// if not full, enters an element at the top
void push (el_t);
// HOW TO CALL: Gives back the removed element via pass by reference.
// PURPOSE: if empty calls an emergency exit routine
// if not empty, removes an element from the top
void pop (el_t&);
void pop (el_t&);
void pop (el_t&);
};
________________________________
stack.cpp
--------------------------------
stacktest.cpp
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started