Question: //-------------------------------------------------------------------- using c++ i need the implementation of the stack as single linked list please #ifndef STACKARRAY_H #define STACKARRAY_H #include #include using namespace std; #include

//-------------------------------------------------------------------- using c++ i need the implementation of the stack as single linked list please

#ifndef STACKARRAY_H #define STACKARRAY_H

#include #include

using namespace std;

#include "Stack.h"

template class StackLinked : public Stack {

public:

StackLinked(int maxNumber = Stack::MAX_STACK_SIZE); StackLinked(const StackLinked& other); StackLinked& operator=(const StackLinked& other); ~StackLinked();

void push(const DataType& newDataItem) throw (logic_error); DataType pop() throw (logic_error);

void clear();

bool isEmpty() const; bool isFull() const;

void showStructure() const;

private:

class StackNode { public: StackNode(const DataType& nodeData, StackNode* nextPtr);

DataType dataItem; StackNode* next; };

StackNode* top; };

#endif //#ifndef STACKARRAY_H

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!