Develop algorithm for program that takes input single letter

Assignment Help Computer Engineering
Reference no: EM131847693

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.

Reference no: EM131847693

Questions Cloud

What type of system would you recommend to facilitate : Given the technologies presented to you in this unit, what type of system(s) would you recommend to facilitate your firm's future needs?
How would you monitor for efficacy and toxicity : How would you monitor for efficacy and toxicity in your patient prescribed albuterol as a short acting inhaler, cromolyn as a mast cell, and budesonide?
Why infrastructure integration is critical to suite function : Explain why infrastructure integration is critical to the suite of applications to function within this environment.
Concept of mineral bioavailabilty and factors affecting : Minerals are important for optimal functioning of the body. Explain the concept of mineral bioavailabilty and factors affecting their absorption.
Develop algorithm for program that takes input single letter : Develop an algorithm for a Java program that takes as input a single letter and displays the corresponding digit on the telephone.
Prepare a report detailing the different financial metrics : Your boss has asked you to compile a report detailing the different financial metrics you can use to assess the business value of the new ERP system.
Occasional shooting and aching pains : MP is a sixty-five-year-old male who has recently retired. He is coming in today for a complaint about pain in his back, knees, and hips.
Explain the advantages and disadvantages of erp systems : Create a one-page document explaining the advantages and disadvantages of ERP systems, why ERP.
How many mg of ancef did the patient receive : 1) A 1200 ml bag contains 400 mg of Ancef. The patient received 800 ml of fluid. How many mg of Ancef did the patient receive?

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd