Final project
For this project, we’re going to make a hypothetical factory that has three assembly line states. As stated in the chapter introduction, one assembly line state will create a certain number of parts, another will create at least one part, and finally, the last line state will only create parts under certain conditions. To do this, we’re going to need a simple CASE
statement to direct the part down the correct assembly line.
In terms of real-world operations, a setup such as this isn’t unheard of. Depending on the type of assembly/process, a machine may be put into certain modes either to produce a certain number of parts, examine previous process results to determine whether the part should continue production, or create a test product for quality assurance or whatever other reasons. Typically, applications such as these are controlled with state machines. To begin, let’s create a pseudocode mockup.
Design
This program is going to...