Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

NOTE: In JAVA please This program will prompt the user to enter a number N and then accept N strings from the user. These strings

NOTE: In JAVA please

This program will prompt the user to enter a number N and then accept N strings from the user. These strings will consists only of letters (both uppercase and lowercase), numbers and spaces. You should store the strings in an array. You are required to write a method that accepts a string and return True if it is palindrome, otherwise returns False. (ignoring case and spaces). If a string happens to be a palindrome, add it to result string. After processing all the input, print the result string on the console. Make sure your program conforms to the following requirements.

The method that processes(i.e., checking if the string is palindrome)should not have a print statement. This method returnsTrue if it is palindrome, otherwise returns False. (ignoring case and spaces).(25points)

The output should be printed in a single line(i.e., if a string happens to be a palindrome, add it to result string. After processing all the input, print the result string on the console which is just a single line consisting of all the palindromic strings separated by a ";").The case of the letters in the input should be preserved.(25 points)

A palindrome is defined as a string that reads the same forward and backward. For example, Race car" is a palindrome.

Sample Run

Enter the number of strings: 8

Enter the strings: Race Car

Mountain Dew

BATMAN

Taco Cat

Stressed Desserts

Is Mayonnaise an instrument

swap paws

A Toyotas a Toyota

The palindromes are: Race Car; Taco Cat; Stressed Desserts; swap paws; A Toyotas a Toyota

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_2

Step: 3

blur-text-image_3

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

6. What data will she need?

Answered: 1 week ago

Question

1. How did you go about making your selection?

Answered: 1 week ago