If you're struggling to figure out how to get your matrix to print out correctly, you may benefit from looking at the static String.format method. It can do a lot.

One thing you might be interested in is something like this:

String form="%1$"+maxLen+"d";
String output=String.format(form,theNum);

maxLen is the space that every value in the String is suppose to take up. (You still need to write the algorithm and code to find that based on the entries in the MathMatrix object.

The documentation (link below) can tell you all you want to know, but in this case,


Joseph Cooper (Former CS307 TA)