Develop an algorithm for a java program that takes as input


Problem

Develop an algorithm for a Java program that takes as input a single letter and displays the corresponding digit on the telephone. The letters and digits on a telephone are grouped this way: 2 = ABC 3 = DEF 4 = GHI 5 = JKL 6 = MNO 7 = PQRS 8 = TUV 9 = WXYZ The screen dialog should look like this: Enter a single letter, and I will tell you what the corresponding digit is on the telephone: R (user enters an R) The digit 7 corresponds to the letter R on the telephone. The program should display a message indicating that there is no matching digit for any non---alphabetic character entered by the user.

Also, the application should recognize only uppercase letters. If a user enters a lowercase letter, the program should display an error message. Prompt the user with an informative message for the input value as shown above. The application should include the input letter as part of the output.

1. Write the algorithm to solve this problem including steps for prompting the user, getting input from the keyboard, and displaying the results.

2. Generate test cases as part of a test plan to exercise all branches of your program.

Provide complete coverage of all decision points. Use the Test Plan document to list all of your test data and the expected results. You do not need to test every letter, however you do need to use input data that will test each option; the letter R tests option 7, so you do not need to test letters P, Q, or S. 3.

Write the Java program that you designed, using your algorithm as a guide. Name the java file Lab5.java. Use your algorithm as comments in the body of the main method. Use proper indentation, and meaningful identifiers throughout the code.

You must comment your code. Run each of the test cases that you created and record the results on the testing document.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Develop an algorithm for a java program that takes as input
Reference No:- TGS02643196

Expected delivery within 24 Hours