Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN REGULAR JAVA (20 points) Write a program that echoes user's input. This is a little similar to the Parrot problem, but unlike a parrot,
IN REGULAR JAVA
(20 points) Write a program that echoes user's input. This is a little similar to the Parrot problem, but unlike a parrot, echo first amplifies the sound and then repeats parts of it Input Validation: If the input is shorter than three characters or the last three characters are not leters, let the user know the input is not valid and exit the program Requirements . Each valid input is followed by 5 lines of output Line 1 repeats the entire input in uppercase letters (this simulates the initial amplification of sound). Line 2 of the input in uppercase letters (echo is still loud) of the input in lowercase letters (echo is getting faint). s the last three o Line 3 repeats the last three Line 4 repeats the last thwo chan of the input in Line.5 repeats the last characters of the input in lowercase letters (echo is barely audble). letters (echo is getting even fainter). HINT: Character class methods will be helpful here, as well as String instance methods Submit: Echo java S java Echo Please type in one or more words: 888888888888 our entry must be at least 3 characters long, and the last three characters must be letters. eron@DESKTOP-OH04PIH MINGW64 -/Documents/Teaching/cs 2011/assignen s java Echo Please type in one or more words: Your entry must be at least 3 characters long and the last three characters must be letters. eron@DESKTOP-OH04PTH MINGW64 /Documents/Teaching/cs 2011/assigmen S java Echo MINGw64 ~/Documents/Teaching/cs 2011/assgmen Please type in one or more words: WEronika WERONIKA O Type here to search sion/description?assignmentld 7032875 Requirements Each valid input is fo by 5 lines of output Line I repeats the pa letters(his simulates the initial ampliation of soundl), Line 2 repeats the last three characters of the input in uppercase letters (echo is still loud Line 3 repeats the last three characters of in Line 4 repeats the last two characters of the input in Line 5 repeats the last characters of the input in lowercase letters (echo is barely audible). the input in lowercase letters (echo is getting faint). letters (echo is getting even fainter) HINT: Character class methods will be helpful here, as well as String instance methods. Submit: Echo.java Sample runs Docunents/ Teacning/CS 2OLt/assigine S java Echo Please type in one or more words: 888888888888 J Your entry must be at least 3 characters long, and the last three characters must be letters. eron@DESKTOP-0H04PIH MINGW64-/Documents/Teaching/cs 2011/assigmen S java Echo Please type in one or more words: our entry must be at least 3 characters long, and the last three characters must be letters. eron@DESKTOP-OH04PIH MINGW64 -/Documents/Teaching/cs 2011/assigmen s java Echo Please type in one or more words: WEronika WERONIKA IKA ika ka Problem: Validate phone number (30 points) Hi 0 Type here to search Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started