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
Get step-by-step solutions from verified subject matter experts
