Question: 1 4 . 1 0 LAB: Palindrome ( Deque ) Instructor note: Eliminate characters that are not letters using the Character.isLetter ( ) method. Example:

14.10 LAB: Palindrome (Deque)
Instructor note:
Eliminate characters that are not letters using the Character.isLetter() method.
Example:
A palindrome is a string that reads the same backwards and forwards. Use a deque to implement a program that tests whether a line of
text is a palindrome. The program reads a line, then outputs whether the input is a palindrome or not.
Ex: If the input is:
senile felines!
the output is:
Yes, "senile felines!" is a palindrome.
Ex: If the input is:
rotostor
the output is:
No, "rotostor" is not a palindrome.
Ignore punctuation and spacing. Assume all alphabetic characters will be lowercase.
Special case: A one-character string is a palindrome.
Hint: The deque must be a Deque of Characters, but ordinary chars will be automatically converted to Characters when added to the deque.A palindrome is a string that reads the same backwards and forwards. Use a deque to implement a program that tests whether a line of text is a palindrome. The program reads a line, then outputs
whether the input is a palindrome or not. Ex: If the input is:
import java.util.Scanner;
import java.util.LinkedList;
import java.util.Deque;
public class LabProgram {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
int j;
String line;
/* Type your code here. */
}
}
it shouldn't include the part for entering your input
1 4 . 1 0 LAB: Palindrome ( Deque ) Instructor

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!