DEVRY CIS 170 Entire CourseDEVRY CIS 170 Entire Course DEVRY CIS 170 C iLab 4 of 7 Functions | Seite 2

If you are using the Citrix remote lab , follow the login instructions located in the iLab tab in Course Home . Locate the Visual Studio 2010 icon and launch the application . Lab : Step 1 : Requirements : Phone-Dialing Program Write a program that simulates the dialing of a phone number . A user will input an 8-place number , for example : UN9-3177 ( note that the hyphen is considered a digit ). The rules for entering phone numbers follow . 8 places It may have numbers , letters , or both . The phone number cannot begin with 555 . The phone number cannot begin with 0 . The hyphen must be in the 4th position . No other characters (@#$% ^ &*()_+=\|/><="" p =""> If all of the rules are met , you will output a message to the console that reads like the following . Phone Number Dialed : UN9-3177 * the number entered If all of the rules are not met , then you output one of the following error messages to the console . ERROR - Phone number cannot begin with 555 ERROR - Phone number cannot begin with 0 ERROR - Hyphen is not in the correct position ERROR - An invalid character was entered It will then prompt the user to try again . This should be a lot of fun ! Here are some great things to think about as you begin your program ! Define a function named ReadDials () that reads each digit and letter dialed into 8 separate char variables ( DO NOT USE ARRAYS ). All the digits are sent back through parameters by reference .
Then , for each digit , the program will use a function named ToDigit (), which receives a single char argument ( pass by reference ) that may be a number or a letter of one of the digits dialed .
If it is a number , then return 0 by value indicating that it is a valid digit . If the digit is a letter , then the number corresponding to the letter is returned by reference , and return 0 by value indicating that it is a valid digit . Here are the letters associated with each digit . 5 J K L 1 6 M N O 2 A B C 7 P Q R S 3 D E F