Question: Define the ADT stack as a derived class from the ADT FrontList using private inheritance ( AsA relationship ) . Which of the following answers
Define the ADT stack as a derived class from the ADT FrontList using private inheritance AsA relationship Which of the following answers is the correct class definition?
Question options:
a
template
class StackAsA : private FrontList
Public:
StackAsA ;
StackAsA const StackAsA & aStack;
virtual ~ StackAsA ;
bool isEmpty const;
bool pushconst ItemType& newItem;
bool pop;
ItemType peek const throwPrecondViolatedExcep;
;
b
template
class StackAsA
private:
FrontList fList;
Public:
StackAsA ;
StackAsA const StackAsA & aStack;
virtual ~ StackAsA ;
bool isEmpty const;
bool pushconst ItemType& newItem;
bool pop;
ItemType peek const throwPrecondViolatedExcep;
;
c
template
class StackAsA : private FrontList
Private:
Node topPtr;
Public:
StackAsA ;
StackAsA const StackAsA & aStack;
virtual ~StackAsA;
bool isEmpty const;
bool pushconst ItemType& newItem;
bool pop;
ItemType peek const throwPrecondViolatedExcep;
;
d
template
class StackAsA: private FrontList
private:
FrontList fList;
Public:
StackAsA ;
StackAsA const StackAsA & aStack;
virtual ~ StackAsA ;
bool isEmpty const;
bool pushconst ItemType& newItem;
bool pop;
ItemType peek const throwPrecondViolatedExcep;
;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
