The Five Steps

Understand the problem

Do a small example by hand

Write an algorithm for solving the problem

This program is one of moderately significant size, and the only way to even hope to get it working is to take a systematic, modular approach to its implementation. For this homework, I will do the partioning into modules for you to show you how it is done. (Later in the course will you be required to perform this type of design on your own). The development steps you will go through below are the same that I used when writing the sample.

In this section I describe the partioning I choose to approach this task. This is by no means the only partioning possible, but is a reasonable one. Looking at the specification for the calculator, it appears we will need to do things like:

So, I will divide the task into five subtasks or modules,
the Operands Module,
the Operators Module,
the Results Module,
and the Display Module.
Of course, we will also need a Driver Module
as the "glue" that binds this whole thing together. (In fact, we will be writing several driver modules as we ncrementally implement each module and test them).
Here is the structure diagram for the entire project:

Translate the algorithm into a programming language (like C)

Test the program


[up] to Overview.