% java BinaryCount usage: java BinaryCount <limit> % java BinaryCount 4 decimal binary 0 0 1 1 2 10 3 11 4 100 % java BinaryCount 17 decimal binary 0 0 1 1 2 10 3 11 4 100 5 101 6 110 7 111 8 1000 9 1001 10 1010 11 1011 12 1100 13 1101 14 1110 15 1111 16 10000 17 10001
If your programming skills are rusty, I can provide a Java skeleton
file for a 3-point penalty. For a point of extra credit, make the
output right-aligned.
Hand in a printout of your code and some sample output that
demonstrates that your program works (copy and paste from the terminal
window into a text editor).
benjerry:~$ mkdir cs202 benjerry:~$ chmod go-rwx cs202 benjerry:~$ cd cs202 benjerry:~/cs202$ mkdir hw1 benjerry:~/cs202$ cd hw1