Question: your task is to create a program that will check to see if a string that the user enters is a palindrome. Using the





your task is to create a program that will check to see if a string that the user enters is a palindrome. Using the PalindromeChecker starter code in the right panel, you are to write 3 methods: 1. isPalindrome() - write a method that uses the charAt() method 2. isPalindrome2() - write a method that uses the substring() method and the equals() method for comparison. Use the same local variables and for loop from the isPalindrome() method by copying and pasting. 3. isPalindrome3() - write a method that creates a new string concatenating each letter in reverse order and then making a comparison to the original string. Local variables and a loop are provided. The autograder is looking for output in the following format in this method: "The string " + str + " is a palindrome." or "The string " + str + " isn't a palindrome." The program will ask the user to enter a word and then should display whether or not the word is a palindrome for all 3 methods. There are comments in the code to give you direction. Which topic did your group research and what were your findings on the topic? Submit Answer! Research Palindrome Group Work In order to prepare for your next coding assignment, you will need to research what a palindrome is. For this activity you will work in groups and research one of the following topics (assigned by your teacher): What is a palindrome? (list examples and define the term) What Java programs exist that are palindrome checkers? (prepare samples to share with the class) What String class methods are used in palindrome checker programs? charAt() - evaluates primitive data type substring() - evaluates reference data type What else can be done with a palindrome program to make it interesting or unique? What is the logic common to each program in determining a palindrome? How can a control structure be used to create an effective palindrome program? Here is the link to the Java API on the String class if needed Be prepared to report your findings to the class. PalindromeChec... 45 //your code goes here return true; public static void isPalindrome3 (String str) //reverses the String 46 47 } 48 49 50 } 51 52 53 { 54 55 56 57 58 59 String reverse = ""; int length = str.length(); for (int i = length 1; i >= 0; i--) 60 { 2 2 2 2 3 3 2 70 63 61 62 64 65 } 66 } 67 //your code goes here //since this is a void method you will not return but print a message 68 69 72 } //students, consider improvements and add ons..... //how could these methods be improved using Java's ignorecase() method? //can you remove the spaces in the phrase? PalindromeChec... 1 1234567890-23122222222222222222 { import java.util.Scanner; public class PalindromeChecker { } public static void main(String[] args) /* The Scanner class is used for reading in data to your program. */ Scanner keyboard = new Scanner(System.in); System.out.println("Please enter a word: "); String word = keyboard.nextLine(); // you will write isPalindrome (), isPalindrome2() and isPalindrome3 () System.out.println(word + " is a palindrome: " + isPalindrome (word)); //calls a boolean method System.out.println(word + " is a palindrome: " + isPalindrome2 (word)); //calls a boolean method 1sPalindrome3 (word); //calls a void method public static boolean ispalindrome (String str) //uses charAt method which returns a primitive data type and evals input { = int i, j; int len str.length(); j = len - - 1; for (i = 0; i If you and your partner finish early implement additional functionality in your Palindrome program as stated in comments in the starter code. Some ideas are: make your palindrome checker case-sensitive removing characters that are not letters and then check for a palindrome When you are ready to test your program, click the Compile and Run button to run the program. The output will display in the terminal panel. COMPILE AND RUN Palindrome Checker Auto-grader When you are ready to submit your program to the auto-grader, click the button below. Check It!
Step by Step Solution
There are 3 Steps involved in it
Below is the modified starter code for the PalindromeChecker program with the implementation of the ... View full answer
Get step-by-step solutions from verified subject matter experts
