Note

NOTE: For registering (to get access to our codes) please send your full info on nirmaciphers@gmail.com.
Your information will be TOTALLY CONFIDENTIAL.

Thursday, February 24, 2011

Messaging application in C++

Alphabet contains 26 characters and telephones only have ten digits on the keypad. We would like to make it easier to write a message to your friend using a sequence of keypresses to indicate the desired characters. The letters are mapped onto the digits as 2=ABC, 3=DEF, 4=GHI, 5=JKL, 6=MNO, 7=PQRS, 8=TUV, 9=WXYZ. To insert the character B for instance, the program would press 22. In order to insert two characters in sequence in cellphone from the same key, the user must pause before pressing the key a second time. The space character should be printed to indicate a pause. For example “2 2″ indicates AA whereas “22″ indicates B. Each message will consist of only lowercase characters a-z and space characters. Pressing ZERO (0) emits a SPACE between words. For instance, the message “hi” is encoded as “44 444″, “yes” is encoded as “999337777″, “foo  bar” (note two spaces) is encoded as “333666 6660022 2777″, and “hello world” is encoded as “4433555 555666096667775553″. To get acquainted with graphics try to make a cellphone using graphics which shows which key is pressed simultaneously the encoded message(which is to be sent to your friend) should appear in cellphone's screen. 

No comments:

Post a Comment