1. Implement a class StackADT.java - a stack that holds characters - i.e. 'a', 'b', 'O', etc. You may use either the arr
Posted: Sat May 14, 2022 6:56 pm
1. Implement a class StackADT.java - a stack that holds characters - i.e. 'a', 'b', 'O', etc. You may use either the array or the linked implementation. Your StackADT.java class should implement the following methods: a. void push (char c); b. char pop(); C. char peek(); d. boolean isEmpty(); 2. Implement a class StringUtilities.java. This class should have a method reverseString, that uses the StackADT.java class in order to reverse a given string and return it. This class should have 2 methods: a. static String reverseString(String str); i. method should use StackADT to reverse a given string. ii. static so that you can simply call it from main using StringUtilities.reverse(...) iii. Example: To reverse the string "hello", you would call: StringUtilities.reverse ("hello"). This should return "olleh". b. static void main(String[] args); i. A main method for you to run test cases for your reverse String method. ii. Example: System.out.println ("Expect: olleh. Got: StringUtilities.reverse ("hello") 3. Deliverable: a. Turn in 2.java files StackADT.java and StringUtilities.java IT +