Code Critique


This assignment is intended to give you practice refactoring a program to improve its design and maintainability without changing its current functionality significantly. You should examine the given student's code that solves the CompSci 100 assignment bins and refactor it based on your thoughts about design and our discussion in class. You may create (and comment) any new classes or methods you want to help improve the program; however, you must justify each line of the final version of code you submit (either by explaining specifically how your change improves the code or by justifying the current implementation). Note, in your justification, you should clearly state your design objectives in writing the code (i.e., in which directions you think this code will most likely be modified in the future).

Additionally, you should provide a set of tests that verify your modified program still works as intended. Tests can be in the form of input data files, separate driver programs, or other classes that verify every line of code written works as intended. For each test, you should submit a text file containing its expected output.

You may submit your project in either Java or C++; code for both is linked below:

In C++

In Java

Grading Criteria

For this assignment, your grade will be determined primarily by how you justify the code you submit rather than simply how many changes you make. In other words, if you feel strongly that the code is perfect as is and make no changes, you can still get an excellent grade if you completely justify logically why the code does not need to be changed in the context of your design objectives. On the other hand, you can also decide to scrap the code entirely and start over from scratch --- again justify your decisions and why the submitted code is better than the original.

Submitting

Submit all code files, all test files (and associated expected output files), a critique justifying your submitted version, and a README explaining the purpose of each file submitted using the guidelines available online here.


Comments?