CIS 351

Number Conversions

Winter 2021

Overview

The purpose of this lab is to provide students an opportunity to work closely with algorithms for changing number bases.

Preparation

Activity

Use the starter code in the GitHub Classroom repository you created last week to write a conversion method that will take in a string representing a number in a specified base and convert it to another base. Do not worry so much about catching error conditions; for this lab it is more important to learn the number conversion process and implement the algorithm.

Restrictions:

Assumptions:

Testing:

I have provided a few sample JUnit tests in BaseConverterStudentTest.java. Add more of your own tests.

I have also written a larger suite of tests that I will use when grading your lab. These tests will run automatically when you push your code. If these tests fail, then you have two problems (1) a bug in your code, and (2) a missing test case (since your test suite didn't find the bug). If your code fails my tests, (1) find the missing test case, (2) fix the corresponding bug, then (3) push the fix. I won't grade your lab until it passes all my tests.

Submission and Grading:

Once your code passes my tests, push the code with the string [Grade Me] in the commit message.


Updated Monday, 28 December 2020, 1:37 PM

W3c Validation