Question: Problem 3: [10 marks] Phone key pads (filename: PhoneKeyPads.java ) Design an algorithm and then write a program that prompts the user to enter a
Problem 3: [10 marks] Phone key pads (filename: PhoneKeyPads.java)
Design an algorithm and then write a program that prompts the user to enter a letter (uppercase or lowercase) and displays its corresponding number on the console. When the character is not a letter, display an error message and use System.exit(0) to terminate the program. Use a switch statement.
Below are some sample runs:
Enter a letter (uppercase or lowercase): A
A is on the number key 2
Enter a letter (uppercase or lowercase): a
a is on the number key 2
Enter a letter (uppercase or lowercase): +
+ is an invalid input
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
