有没有人帮帮我搞定这一段JAVA代码!
本人刚开始学习JAVA,毫无头绪,但是现在需要搞定这段代码,希望大家帮我的忙!
SMS Message Coding Java
You are required to design and implement (in Java) the front end of a web-based SMS (Short Message Service) gateway that will allow Internet users to send text messages to mobile phones.
SMS messages can be comprised of words or numbers (alpha-numeric characters) up to 160 characters in length. This limitation on message length, combined with the inconvenience of using mobile phone keypads for typing text has helped give rise to a popular culture of SMS abbreviations, similar to that found in internet chat-rooms. “b4n”, “L8”, “b4” and “btw” are examples of such usage (“bye for now”, “late”, “before” and “by the way”).
Your task at this stage is to design and write a Java program that will :
Prompt the user for a mobile phone number.
Verify the number is in a valid format (ie exactly 11 numeric characters etc).
Prompt the user for a text message.
Where possible, encode the message using SMS abbreviations.
Display the encoded (abbreviated) message to the user.
If text size still exceeds 160 characters, prompt user to edit the message.
Display the percentage reduction produced by this coding.
Bonus task:
Implement a decoding algorithm that would recover the original text message from an abbreviated version.