Building on the reading task sent out Tuesday afternoon, we have a coding exercise to complete: implementation of an algorithm for constructing a representation, in any integral number base (radix) from 2 to 36, of an input integer value. Please note, however, that the point of the exercise isn’t really conversion of number representations between radices, but practicing our understanding of Java iteration statements, conditional statements, and exceptions.
The algorithm to be implemented—shown here in the reading assignment—is not nearly as complicated as it might seem at first glance. It is simply a process of repeated division of a running value by the radix, concatenating the remainders from the division operations into a single string of characters.
The details of this exercise, including the test cases that will be used to test the implementation, can be found at “Alternative Radices Assignment”. That page also has a link that, when clicked, will take us to a GitHub Classroom assignment page, resulting in the creation of a code repository for each individual that accepts the assignment; that repository must be “cloned” (copied from GitHub to your local machine) and imported into Eclipse. To help you perform these steps, and to tweak a couple of Eclipse settings to make the process run more smoothly, I’ve put together a couple of videos, linked below.
Links
-
Reading: “Alternative Radices”: The previously assigned reading on alternative radices & a conversion/representation algorithm.
-
Video: “Additional Eclipse configuration tips”: Setting up the default workspace as the default location for Git repositories; folding comments by default.
-
Assignment: “Alternative Radices Assignment”: Details of the coding task.
-
GitHub Classroom assignment link: Link to create an individual copy of the Git repository containing the method to be completed. (This link is also shown on the page linked immediately above.)
-
Video: “Clone, import, build”: Walk-through of the process of accepting the assignment, cloning the repository, importing into Eclipse as a Maven project, running tests, starting the implementation code.