CyberArmy University | Open Source Institute | CyberArmy Intelligence & Security | CyberArmy Services & Projects

Binary -> ASCII Test Cases


[Replies] [Reply] [View by Thread] [Help]
[Back To SNEAK Development Forum]

Posted by Cpt SAJChurchey On 2005-02-22 01:52:49
In Reply to Eeek. Update... Posted by CinC snarkles On 2005-02-21 21:21:18

Cpt
Cpt SAJChurchey


Any input other than 1s and 0s and the white space separating them should be thrown out b/c it's not binary. I think we need to write a RuntimeException to handle improper input on the user's part. The message with the exception should contain the proper type of input the user should enter, and we can use try-catch blocks to report the error to the user once we put all of this together.

The zero case is correct, b/c zero in binary is zero in decimal, which is the NULL character on the ASCII table.

Should we assume that the user's input will be easy to tokenize (1 - 16 0s or 1s separated by whitespace)? Otherwise, we risk not knowing when one character begins and another one ends b/c we're looking to try and support UTF-16 as well as UTF-8 and subsets thereof.

Cpt SAJChurchey
C/O of
Editorial
OSI Staff edit0r
OSI Feedback Representative




Replies:


Guest:
Subject:
Message:
Signature:
Optional Image Link:
http://

CyberArmy::Forum v0.6
Generated In 0.02279 seconds


About Us | Privacy Policy | Mission Statement | Help