programming
This is he want we create name Stack and Zip file is include 5 stack methods. Test all 5 stack methods with a program which will:
1. import statements
2. Create a string to contain the name and a Scanner object to enter the name
3. Create an ArrayStack of strings called nameStack and a Scanner object called in.
4. Check to see if name stack is empty
5. Ask for the number, n, of your friends to be added to the stack.
6. Enter the full names of n friends into nameStack using a while or for loop.
7. Display the size of nameStack.
8. Display nameStack.
9. Peek the stack and display the entry that was peeked and .
10. Pop 2 names off the stack and display them.
11. Check to see if nameStack is empty.
12. Display the size of nameStack.
13. Display nameStack.
14. Repeat (y/n)? at least 2 times.