Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Telephone numbers can include one or more alphabetic characters, such as A, c. Write a program that will transform a 10-digit telephone number (may contain

Telephone numbers can include one or more alphabetic characters, such as A, c. Write a program that will transform a 10-digit telephone number (may contain one or more alphabetic characters, may contain numeric characters). The user is supposed to enter the 10-digit telephone number one by one digit (loop). Display the telephone number using numerals only and in format (***)-***-****. Please consider that both upper case and lower case could be entered.

The numbers and letters are associated as follows on your telephone:

ABC: 2

DEF: 3

GHI: 4

JKL: 5

MNO: 6

PQRS: 7

TUV: 8

WXYZ: 9

Implement the following steps:

(in JAVA)

Prompt user to enter digits of telephone number (may contain one or more alphabetic characters, may contain numeric characters) (loop).

Convert each alphabetic character to associated numbers (if/else or switch case).

Allow both upper case and lower case to be entered.

Display the telephone number using numerals only and in right format.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Systems A 360-degree Approach

Authors: Jawwad ShamsiMuhammad Khojaye

1st Edition

0429531575, 9780429531576

More Books

Students also viewed these Databases questions

Question

=+ c. a company president deciding whether to open a new factory

Answered: 1 week ago