Question: 2. (13 points) Consider the partial specification for Stack class shown below which also appears on the course web site and which we discussed in
2. (13 points) Consider the partial specification for Stack class shown below which also appears on the course web site and which we discussed in class. #include
b. (2 pts) Why is there a destructor for this class?
c. (2 pts) Implement the destructor.
d. (2 pts) What important big three function is missing from this specification? What are the implications of its absence? NOTE: there are two questions which must be answered here.
e. (5 pts) Implement the assignment operator so it implements a deep copy of a Stack. If you think it helpful, you may assume the existence of the missing big-three function for your implementation.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
