The following exercises refer to this program shell:
public class PalindromeTestWrapper {
final String isMsg = "Is palindrome";
final String isNotMsg = "Is NOT palindrome";
public static void main(String[] args) {
new PalindromeTestWrapper();
}
public PalindromeTestWrapper() {
// Your code here
}
public boolean isPalindrome(String s) {
// Your code here
}
}
A palindrome is a word that reads the same forwards as backwards. The words "tot", "civic", and "radar" are palindromes; the words "tote" and "civil" are not.
a. Complete the PalindromeTestWrapper method so that it reads a string from the user, calls isPalindrome to determine if it is a palindrome, and displays an appropriate message. Your program must allow the user to repeatedly enter strings using recursion.
b. Complete the isPalindrome method so that it returns true if s is a palindrome and false if it isn't. You must use only one stack in your solution algorithm. You must use the Java API class java.util.Queue in your coding.