Lab DoubleStack - Implement a double stack

The partial source code for this lab is at http://vpl.ccom.uprp.edu.

Suppose that some application requires using two stacks whose elements are of the same type. A storage structure for a two-stack data type could be to use a single array for the storage structure and let the stacks grow toward each other.

https://i.imgur.com/1yJto3t.png

Design a class (called DStack) for this two-stack data type using this implementation and a static array. In your functions for the basic stack operations, the number of the stack to be operated upon, 1 or 2 (or 0/1 as we shall use in our implementation), should be passed as a parameter. Be sure to implement the following:

We provide with starter code and a client in the vpl.ccom.uprrp.edu assignment "Stack: Double Stack". All you must do is implement the member functions.

The client implements an interface in which the user enters commands to invoke the various stack functions. For example, when the user types "r 0 22" the client will insert a 22 in stack #0. See other instructions in the client source code file.

Do not change the client source code since it might damage your results.