Designing the inventory control system
If you step back and review our inventory control program's functionality, you can see that there are three fundamental types of activity that this program needs to support:
- Storing information
- Interacting with the user
- Generating reports
While this is very general, this breakdown is helpful because it suggests a possible way of organizing our program code. For example, the part of the system responsible for storing information could store the lists of products, locations, and inventory items and make this information available as required. Similarly, the part of the system responsible for interacting with the user could prompt the user to choose an action to perform, ask them to select a product code, and so on. Finally, the area of the system responsible for generating reports would be able to generate each of the desired types of report.
Thinking about the system in this way, it becomes clear that each of these three parts of the system could be...