Palindrome Checker create a JavaScript program that checks if phrases entered by the user are palindromes. A palindrome is a word, number, phrase, or other sequence of characters which reads the same backward as forward, such as “SIR”, “raceBIKE”, “Never odd or even”, “20/1/20”. The program should prompt the user to type in a phrase that is at least three characters long, and then tell the user whether the phrase was a palindrome. Note, the decision should be based solely on letters and numerical digits, and so it should not consider other characters, such as spaces or exclamation marks, even though these might be entered by the user. when checking palindromes. A. Select your test data with care. Both palindromes and non-palindromes would be included in this. Provide examples that are text, numeric, and mixed; ignore any additional characters and spaces; and B. Ask the user for the word and then read their input. To verify that their input string has been read correctly, test this by displaying it.

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 2PE
icon
Related questions
Question

Palindrome Checker
create a JavaScript program that checks if phrases
entered by the user are palindromes. A palindrome is a word, number, phrase, or other

sequence of characters which reads the same backward as forward, such as “SIR”,
“raceBIKE”, “Never odd or even”, “20/1/20”. The program should prompt the user to type
in a phrase that is at least three characters long, and then tell the user whether the phrase
was a palindrome. Note, the decision should be based solely on letters and numerical
digits, and so it should not consider other characters, such as spaces or exclamation
marks, even though these might be entered by the user.


when checking palindromes.
A. Select your test data with care. Both palindromes and non-palindromes would be included in this. Provide examples that are text, numeric, and mixed; ignore any additional characters and spaces; and
B. Ask the user for the word and then read their input. To verify that their input string has been read correctly, test this by displaying it. Repeat your testing using examples that were carefully curated.E. Lowercase all the letters. By showing the "before" and "after" versions of the inputted phrases, you can verify this.

F. Made the resulting phrase into a reversed form. Display both iterations of the phrase to verify this.
G. To determine whether the phrase was a palindrome, compare the original and reversed phrases. Verify the comparison's conclusion is accurate.
H. Show the resolution. Check to make sure the conclusion is presented correctly.
I. Any code added specifically for testing can be commented out once you are confident that your programme works and has been thoroughly tested.
C. Remove all whitespace and irrelevant characters, leaving only letters and numeric digits. By showing the "before" and "after" versions of the inputted phrases, you can verify this.
D. Check the remaining phrase's length; if it is less than three characters, prompt the user and exit the programme. Try it with words like
Finish the Basic Build and Additional Build completely, and then create a new version of the programme that has been modified to ask the user to load a text file with multiple phrases, each on a separate line. When the programme has finished reading each line, it should output the phrase and indicate whether or not it is a palindrome. (Note: If you choose to complete this build element, make sure you also submit the separate code for the Basic Build and Additional Build programme 

Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Knowledge Booster
Methods of StringBuilder class
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
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,