In this chapter, we examined four code organization principles that can be used alone or in combination to develop well-structured projects. The four principles of organization by type, by purpose, by layer, and by convenience are helpful perspectives for inspiring good architecture choices when structuring larger projects. The larger and more complex a project becomes, the more important these decisions become, though simultaneously more difficult to change.
Applying these concepts, we restructured the entire project using each principle to a varying degree. We also incorporated significant changes to allow interfacing with external libraries and applied operations of the elevator, as opposed to a closed simulation. Now, the elevators of three buildings should be capable of running entirely on the software developed here.
In the next chapter, we will learn about mutability...