C++ Design Critique
This project 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 student's code given below that implements a
general solution to the CompSci 100 assignment animals given for the past few semesters and refactor it based on your thoughts about design and our discussion in class. You may create (and comment) any new classes you want to help improve the program; however, you should justify each change you make by explaining specifically how it improves the code.
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.
The code is linked below or available for checkout from Eclipse as animals_c++.
Critique
You should critique the code and design of the program in terms of its C++ style, design, and general readability. The program has some good qualities, but the design and code also have some problems. You should write approximately one page analyzing the code and design. The following points should help guide your critique.- Good things about the code, that you might keep in the final version.
- Problems with the code, things that have easy fixes but that show flaws in use of C++ or coding in general.
- Problems of consistency in which a simply fixed by choosing a specific style and sticking with it.
- Problems with the design that make it hard to test the code easily to verify it works.
- Problems with the design for reuse. There may be immediately apparent problems with the design of the program/class, but you may find it necessary to think of how the program might be used in order to make pronouncements on design flaws. A good design will facilitate changing/extending the code or using it in new ways.
- How helpful were the comments? What would make them more helpful? Do the comments get at the important aspects of the code?
- Any other comments are welcome.
Comments?