Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need help writing a program in C that simulates a mobile phone\'stext entry sy

ID: 3618421 • Letter: I

Question

I need help writing a program in C that simulates a mobile phone'stext entry system, which is Multi-Tap.
Pressing the same key multiple times cycles through theletters and digit associated with each key.  For example,pressing the “1” key once corresponds to an‘A’, twice to a ‘B’, three times to a‘C’, and four times to the digit ‘1’itself.  
Your main() function shouldread in the sequences of digits the user enters, convert them tothe appropriate letters/numbers, and display the complete resultingalpha/numeric message.
Define symbolic constants forall fixed/reference quantities such as the number ofkeys, etc.  Store each letter/digit in atwo-dimensional character array.  The array should beindexed by key and frequency, i.e. the number of times it’spressed.  You need to write one or more functions todetermine the key the user pressed, count how many times theypressed it, using that information look up the correspondingcharacter in the table, and add most recently entered character tothe end of the message being composed.   Your program shoulddisplay a legend of some sort that shows the key to lettercorrespondences.  It should also clearly state any otherinstructions you want the user to follow in order to enter theirdesired message.
Please pleasehelp!
Pressing the same key multiple times cycles through theletters and digit associated with each key.  For example,pressing the “1” key once corresponds to an‘A’, twice to a ‘B’, three times to a‘C’, and four times to the digit ‘1’itself.  
Your main() function shouldread in the sequences of digits the user enters, convert them tothe appropriate letters/numbers, and display the complete resultingalpha/numeric message.
Define symbolic constants forall fixed/reference quantities such as the number ofkeys, etc.  Store each letter/digit in atwo-dimensional character array.  The array should beindexed by key and frequency, i.e. the number of times it’spressed.  You need to write one or more functions todetermine the key the user pressed, count how many times theypressed it, using that information look up the correspondingcharacter in the table, and add most recently entered character tothe end of the message being composed.   Your program shoulddisplay a legend of some sort that shows the key to lettercorrespondences.  It should also clearly state any otherinstructions you want the user to follow in order to enter theirdesired message.
Please pleasehelp! Pressing the same key multiple times cycles through theletters and digit associated with each key.  For example,pressing the “1” key once corresponds to an‘A’, twice to a ‘B’, three times to a‘C’, and four times to the digit ‘1’itself.  
Your main() function shouldread in the sequences of digits the user enters, convert them tothe appropriate letters/numbers, and display the complete resultingalpha/numeric message.
Define symbolic constants forall fixed/reference quantities such as the number ofkeys, etc.  Store each letter/digit in atwo-dimensional character array.  The array should beindexed by key and frequency, i.e. the number of times it’spressed.  You need to write one or more functions todetermine the key the user pressed, count how many times theypressed it, using that information look up the correspondingcharacter in the table, and add most recently entered character tothe end of the message being composed.   Your program shoulddisplay a legend of some sort that shows the key to lettercorrespondences.  It should also clearly state any otherinstructions you want the user to follow in order to enter theirdesired message.
Please pleasehelp!

Explanation / Answer

I can help you if you want to read the whole sequence, and thenconvert it into a message. If you want simultaneous conversion,that can be very difficult. I assume the easier case: you read the whole sequence of digitsinto an array and then convert it into a message. First, you need a two-dimensional character array, that lookslike: 0 A B C 1 D E F 2 G H I 3 J K L 4 M N O 5 P Q R S 6 T U V 7 W X Y Z 8 9 Row represents the digit you have pressed, and column is related tofrequency. First you read a character, and count it using loop or any methodyou like. Letter you want to output is: array[digit][frequency] So, for example: "1552" should be interpreted as array[1][1], array[5][2],array[2][1] or "AND" I hope you got the idea...