Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the following answer in JAVA (not javascript). Please provide answer in copyable text. Show input and output. Thanks in advance. 1) A palindrome

Please write the following answer in JAVA (not javascript). Please provide answer in copyable text. Show input and output. Thanks in advance.

image text in transcribed

1) A palindrome is a word or phrase that reads the same forward and backwards. A simple example of a palindrome is the word "radar". "Toyota" is not a palindrome but the phrase "A Toyota" is a palindrome. Write a program that calls an isPalindrome method that returns true or false if the phrase is or is not a palindrome. Your palindromeTester() program should call isPalindrome for each of the test strings listed below. After each line of input, print whether the input string is a palindrome or not. Your is Palindrome() method should ignore case, punctuation, and white space. Your program should have this structure: main() palindrome Tester called from main for each test string boolean isPalindrome (String s) called from palindromeTester You must test your program with all of these strings: "To be or not to be" "A Santa as NASA" Acrobats stab orca" "Senile felines" "A man, a plan, a canal: Panama" Madam, I'm Adama" "Doc, note: I dissent. A fast never prevents a fatness. I diet on cod" "radar" Your test output should look like this: "To be or not to be" is NOT palindrome "A Santa as NASA" is NOT a palindrome Acrobats stab orca is a palindrome etc. DON'T PRINT IN THE isPalindrome() method, use .toString and print in the main method

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Time Series Databases New Ways To Store And Access Data

Authors: Ted Dunning, Ellen Friedman

1st Edition

1491914726, 978-1491914724

More Books

Students also viewed these Databases questions