Online Exam

CCE 170 - Final Exam KEY

Fall Semester 2021

Page 1
Page 2
Page 3
Page 4
[Page 5]
Page 6
Page 7

30. The following spreadsheet contains a list of mobile phone numbers for a group of people. It is possible to send an e-mail message to a mobile phone by constructing an e-mail address based on the phone number and an e-mail suffix associated with the carrier. For example, if my mobile number is (801) 345-9887 and my carrier is Sprint, the e-mail address for my mobile phone would be 8013459887@messaging.sprintpcs.com and any e-mail sent to that address would come to my phone as a text message.

Click here to download a copy of this spreadsheet. Then complete the following exercise. Follow all instructions carefully.

Click here to download a copy of the solution.

Note: as you complete this exercise, you may refer to the table of VB string functions.

(a) Write a custom function called mobemail that takes two string arguments as input (mobile number and carrier) and returns the corresponding mobile e-mail address as a string. Note that an e-mail address is always in the form prefix@suffix. Your function code should consist of four main parts:

i) (functions) (2 pts) Write the main shell of your function with the first and last lines of code and the input arguments and the return value defined on the first line.

ii) (strings) (4 pts) Create the prefix by taking the mobile number argument and removing everything but the numbers. I.e., get rid of the open and close parentheses, dashes, and spaces ("(", ")", "-", " "). You can assume that these are the only extra characters that would be found in the number.

iii) (ifthen) (4 pts) Select the appropriate suffix based on the following table:

Carrier Suffix
AT&T txt.att.net
Cingular cingularme.com
Cricket sms.mycricket.com
Nextel messaging.nextel.com
Sprint messaging.sprintpcs.com
T-Mobile tmomail.net
Verizon vtext.com

iv) (strings) (2 pts) Build the full e-mail string using the format prefix@suffix. Set this as the return value for your function.

(b) (functions) (1 pt) Enter a formula that references your mobemail function in the range F5:F19 to display the e-mail addresses in column F. Use columns D and E as the input arguments to your function calls.

 

(Upload instructions and links went here)