As the team simplifies the code by using patterns, they also use SOLID principles to help identify problems. By simplifying the code, the team aims to make the code more maintainable and easier for new team members to understand. This approach of reviewing the code with a set of principles is very useful in writing concise classes that only do what they need to achieve, and putting in a layer of abstraction that helps to write code that is easier to modify and understand.
SOLID principles
Single responsibility principle (SRP)
The first principle that the team applies is the single responsibility principle (SRP). The team identified that the actual mechanism of writing to the console is not the responsibility of the InventoryCommand...