The Three-legged Chronicle
Once upon a time in a not so far away land there lived an emperor who called two of his counselors to test them. He showed to both of them a shining metal box with two holes on the upper face, a button and a handle. "What do you think of this?" he asked.
One of the counselors, who was a hardware specialist, answered the first: "It's a toaster, your highness", he said. And the emperor asked: "How would you design a computer that would control this thing?" After a short while, the counselor answered: "Using a 4 bits control device, I would write a simple program that would read 16 nuances of gray, from white as snow to black as coal. I'd use a program that would make this level of gray index the 16 elements' table, while the first would be the initial value of the timer.
Then we start the heating elements and we start the timer with the initial value of the timer. In the end, it will turn off the heat and it will take out the toast. I could present a prototype next week, if your highness wishes." The second counselor, a software specialist, realized immediately the peril of such a simple thinking, so he said: "Toasters are made not only to transform bread into toast, they can be used also to heat rolls or to unfreeze bread. As your highness' subjects become more and more sophisticated, they would like to have more and more possibilities.
They'd need an oven for breakfast in which to cook sausages and omelet and fried bacon. A toaster that would only toast would be soon useless. If we don't think on a wide range we shall have to modify the toaster only in a few years." "Considering all these, I would think that an intelligent solution would be to create a class of breakfast food and then define several subclasses as for example: meat, vegetables, chicken.
The process of specialization will have to be repeated at an inferior level. Thus, the subclass "chicken" may be divided into boiled eggs, omelet and soft-boiled eggs, meat may be divided into sausages, bacon and various classes of lard." "The classes of bacon and cheese omelet deserve a special attention because they inherit features of the meat, the chicken and diary products. As one can easily see, the problem can't be solved without a multiple inheritance theory. While running, the program must create the needed object and send a message to the object, something like "bake".
The semantics of this message is of course dependent on the specific characteristics of the object. We will have thus a different message for a piece of toast or for an omelet. Reviewing the process described so far, we see that the analysis phase has revealed as a primary query the necessity of baking anything. We observe a few derived queries in the design phase, such as the necessity of an object-oriented language that would benefit of a multiple inheritance. And of course, as we don't want the eggs to get cold until the bacon is fried, so we need concurrent processes.
The interface with the user is not to be neglected. The opening handle and the start button are not clear. The buyers won't spend money on something confuse or unfriendly. For example, when the breakfast oven is plugged-in, the users should see a boot with spur on the screed and when they click on it they should see the message "UNIX v.8.3 boots" (UNIX 8.3 will be released until our product is launched on the market).
Then the user can choose a menu and select the elements that will compose his or her breakfast. Selecting wisely the software we need in the design phase we can now choose the hardware support that would be appropriate for the implementation phase. An Intel Pentium of 48 MB, with a 1.2 GB and a SVGS monitor probably would do and if we choose a multiasking, object oriented language that supports multiple inheritance, we could write the program in an eye blink." Then the emperor, overcome with wisdom, ordered his soldiers to behead his software counselor and they all lived happily ever after.