Projects.Java.01

Java Project 1:
Binary Conversions

Problem

Create a project that can convert a binary number into decimal form and a decimal number into binary. Binary numbers should be output as Strings.

Instructions

  1. Methods should return a String for binary numbers or an integer for decimal numbers.
  2. Create good unit tests that use good test data.
  3. Make sure your program is robust.
  4. Make sure your program is commented. Provide a comment at the top of each class as well as comments before each method that specify the preconditons, postconditions, and parameters.
  5. Make sure your name is in the title of the project and turn it in to Mr. Miller's Neighborhood.

Extra Credit

Create methods to convert to/from hexadecimal and octal numbers.

Tips

  • The Integer class included with Java can make this project incredibly easy.
  • Take the time to plan your project first. Determine the classes, methods, and variables you will include.