WRITE A JAVA PROGRAM? Tags: String Problem Description Puan Ruqayyah, Madam Chong and Miss Lela teach their dyslexia students to identify characters. They tested randomly on strings of characters and numbers. They found that a few children get excited when they read certain series of strings. The teachers were curious and began to find out that these kids love strings that have series of characters that can be read similarly from right and from left. There are not that many meaningful words and numbers with such pattern. The teachers are interested to collect these meaningful words and numbers to share with their dyslexia students. Examples of such strings are CIVIC, KAPAK, 2102012 (which is 2nd Oct 2012), 1102011 (which is 1st Oct 2011), among others. Now, you are to help Puan Ruqayyah and her colleagues to select such strings. Write a program that reads in a sequence of characters and determine if it can be read similarly from right and from left. Input The first line of input is an integer N (1 ≤ N ≤ 50) that represents the number of test cases, followed by N lines of input. Each of the input contains a string of alpha-numeric characters. The string will have less than 50 characters. Output For each test case, output a line in the format "Case #x: " where x is the case number (starting from 1), follow by either Yes or No.   Sample Input:                         3                         RACECAR                         mirror                         Civic   Sample Output:                         Case #1: Yes                         Case #2: No                         Case #3: Yes

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
WRITE A JAVA PROGRAM?
Tags: String
Problem Description

Puan Ruqayyah, Madam Chong and Miss Lela teach their dyslexia students to identify characters. They tested randomly on strings of characters and numbers. They found that a few children get excited when they read certain series of strings. The teachers were curious and began to find out that these kids love strings that have series of characters that can be read similarly from right and from left.
There are not that many meaningful words and numbers with such pattern. The teachers are interested to collect these meaningful words and numbers to share with their dyslexia students. Examples of such strings are CIVIC, KAPAK, 2102012 (which is 2nd Oct 2012), 1102011 (which is 1st Oct 2011), among others.
Now, you are to help Puan Ruqayyah and her colleagues to select such strings. Write a program that reads in a sequence of characters and determine if it can be read similarly from right and from left.


Input
The first line of input is an integer N (1 ≤ N ≤ 50) that represents the number of test cases, followed by N lines of input. Each of the input contains a string of alpha-numeric characters. The string will have less than 50 characters.


Output
For each test case, output a line in the format "Case #x: " where x is the case number (starting from 1), follow by either Yes or No.

 

Sample Input:

                        3
                        RACECAR
                        mirror
                        Civic

 

Sample Output:

                        Case #1: Yes
                        Case #2: No
                        Case #3: Yes

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Top down approach design
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education