Explore BrainMass

Write a program that simulates the dial of a phone number.

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Write a program that simulates the dial of a phone number. The program will accept a phone number as input, and it will acknowledge the call by either writing an error message or the 8 digit phone number to the console window. The phone number may have either digits, letters, or both.

Here are the letters associated with each digit.

0 5 J K L
1 6 M N O
2 A B C 7 P Q R S
3 D E F 8 T U V
4 G H I 9 W X Y Z

A phone number never begins with a 0 or 555, so the program should flag an error if such a number is entered. A phone number always has a hyphen (-) in the 4th position. If a hyphen is in any other position, it is considered an invalid digit. If the phone number is valid, write the converted number to the output file.

The program should process any number of phone numbers until the user enters a Q.

Please refer to the attachment for sample input-output session with the program, and the pseudo code, using which the C++ code has to be written for this simulation.

© BrainMass Inc. brainmass.com October 17, 2018, 1:55 am ad1c9bdddf


Solution Summary

Fairly commented code for easy understanding. Implementation is in accordance with given "Program pseudocode.docx".

Similar Posting

Marketing Promotions used by Dell and Apple Computers

Discuss the marketing promotions used by Dell and Apple computers. Compare and contrast the promotional activities - both online and offline - and discuss why they are successful/or not. Use promotions currently being used by each organization. Focus the comments on the communication medium and messages, and how they align with the four P's (product, price, promotion, placement (distribution).

View Full Posting Details