Question: //--------------------------------------------------------------------- // Palindrome.java by Dale/Joyce/Weems Chapter 4 // // Provides a method to test whether a string is a palindrome. // Non letters are skipped.
//--------------------------------------------------------------------- // Palindrome.java by Dale/Joyce/Weems Chapter 4 // // Provides a method to test whether a string is a palindrome. // Non letters are skipped. //--------------------------------------------------------------------- package ch04.palindromes;
import ch02.stacks.*; import ch04.queues.*;
public class Palindrome { public static boolean test(String candidate) // Returns true if candidate is a palindrome, false otherwise. { char ch; // current candidate character being processed int length; // length of candidate string char fromStack; // current character popped from stack char fromQueue; // current character dequeued from queue boolean stillPalindrome; // true if string might still be a palindrome
StackInterface
// initialize variables and structures length = candidate.length(); stack = new ArrayBoundedStack
// obtain and handle characters for (int i = 0; i

How would you change the test method of the Palindrome class so that it considers all characters, not just letters? Identify the statements you would change, and how you would change them
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
