Question: Again, please in c++ NOT in java. Thanks. In C++ only. NOT java or anything else please. Implement a stack whose size can grow as

In C++ only. NOT java or anything else please. Implement a stack whose size can grow as elements are inserted into the stack. Build three different implementations of this stack. Two of these implementations will be array-based, and each of these two should take an initial capacity for the stack in the constructor. The only difference between these implementations will be what happens when the stack is full. For the first implementation (ArrayStack) you should increase the size of the array by a constant amount. For the second implementation (DoublingArrayStack ) you should double the size of the array. For the third implementation, you should implement a stack using a Linked List. Then you will time the three implementations. For each version of your stack, push a large amount of random numbers onto the stack, these numbers should be read in from a file, one number per line. The program should be able to push into the stack as many numbers as there are in the file. Time how long this takes. Measure the total time at fixed intervals. For the array-based implementations, start with some small capacity significantly smaller than the maximum number of push operations, and for the ArrayStack, your increment amount should also be significantly smaller than the number of push operations. Graph the times for the three implementations. This process will allow you to see how your choice of implementation can affect performance
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
