Design and implement the following functions in a Java program:
1. 'topToBottom(Stack stack)' (10pts): This function takes a stack of integers as a parameter and displays the stack contents from the top of the stack to the bottom of the stack. The top value should be printed first, and the bottom value should be printed last. This function should not change the stack content.
2. 'bottomToTop(Stackstack)' (10 pts): This function takes a stack of doubles as a parameter and displays the stack contents from the bottom of the stack to the top of the stack. The bottom value should be printed first, and the top value should be printed last. This function should not change the stack content.
3. 'flipStack(Stack stack)' (15 pts): This function takes a stack of strings as a parameter and returns the same stack object with its content flipped (re-arranged). In other words, the stack content should be reversed. For example, if the stack 'names' has the values (from top to bottom): "Ed", "Tom", "Bob", "Amy" before calling this function, the stack should have the values (fr