Question: Complete this assignment as a JavaFX application with a Button event handler, use regular expressions to test whether the user has entered an English-language phrase

Complete this assignment as a JavaFX application with a Button event handler, use regular expressions to test whether the user has entered an English-language phrase (only letters and blank spaces) or a Morse code message (only dots (.), dashes (-) and blank spaces) (display an error message for any other invalid input); then perform the appropriate coding or decoding and display the result
14.22 (Morse Code) Perhaps the most famous of all coding schemes is the Morse code, developed by Samuel Morse in 1832 for use with the telegraph system. The Morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (e.g., period, com ma, colon, semicolon). In sound-oriented systems, the dot represents a short sound and the dash a long sound. Other representations of dots and dashes are used with light-oriented systems and sig. nal-flag systems. Separation between words is indicated by a space or, simply, the absence of a dot or dash. In a sound-oriented system, a space is indicated by a short time during which no sound is transmitted. The international version of the Morse code appears in Fig. 14.26. Character Code Character Code Character Code : Digits AO : LOI-- ZOOME > BXN 1 : I . . III - M Fig. 14.26 Letters and digits as expressed in international Morse code. Write an application that reads an English-language phrase and encodes it into Morse code. Also write an application that reads a phrase in Morse code and converts it into the English-lan- guage equivalent. Use one blank between each Morse-coded letter and three blanks between each Morse-coded word. 14.22 (Morse Code) Perhaps the most famous of all coding schemes is the Morse code, developed by Samuel Morse in 1832 for use with the telegraph system. The Morse code assigns a series of dots and dashes to each letter of the alphabet, each digit, and a few special characters (e.g., period, com ma, colon, semicolon). In sound-oriented systems, the dot represents a short sound and the dash a long sound. Other representations of dots and dashes are used with light-oriented systems and sig. nal-flag systems. Separation between words is indicated by a space or, simply, the absence of a dot or dash. In a sound-oriented system, a space is indicated by a short time during which no sound is transmitted. The international version of the Morse code appears in Fig. 14.26. Character Code Character Code Character Code : Digits AO : LOI-- ZOOME > BXN 1 : I . . III - M Fig. 14.26 Letters and digits as expressed in international Morse code. Write an application that reads an English-language phrase and encodes it into Morse code. Also write an application that reads a phrase in Morse code and converts it into the English-lan- guage equivalent. Use one blank between each Morse-coded letter and three blanks between each Morse-coded word
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
