Machine Shop First Iteration Proposal - griml017/Machine-shop-simulator GitHub Wiki
Below are our prioritized list of refactorings. Our initial plan is to tackle these in this order, but we may need to revise that plan as we move into the refactorings.
This will address Issue #9. There are classes within the Machine-shop-simulator class that need to be extracted into separate classes (MachineShopSimulator, Task, Job, Machine, EventList).
Our plan is to extract the classes Task, Job, Machine, and EventList and create new separate classes for each one.
The refactoring will be easy, but due to classes no longer interacting properly after extraction, an additional refactoring will be necessary.
This helps address the issue, and will impact every part of the program. This has a very large impact on the project. It will improve readability, as well as mobility of the code.
This will address Issue #25. The fields in the newly extracted classes are set to private, which restricts access to them from the other classes.
Our plan is to use the Encapsulate Field option in Eclipse to add get/set methods along side the private fields in the separate classes.
The refactoring will be difficult. It will take proper testing to ensure all the fields are still connecting to each other.
This helps address the issue raised by the previous refactoring, while maintaining security.
This will address Issue #14. There are comments in every class that have no purpose, as well as unclear meanings.
Our plan is to clear up the comments, by either clarifying the existing comments or by deleting the comments that shouldn't be there.
The refactoring will be easy, as long as we have an understanding of what the code is doing.
This has impact on the readability of the code.
Refactoring 0 and 1: These two steps became intertwined during the refactoring. With each class we separated, we had to adjust the visibility of the fields to retain functionality of the classes. This turned out to be fairly easy, and definitely opened up other refactoring opportunities.
Refactoring 2: This step was fairly easy; most comments were irrelevant and could be removed. Where they were necessary, we were able to simplify them and leave them be. A few comments required modifications of what was happening, but beyond that, the step was easy.