The Five Steps
Translate the algorithm into a programming language (like C)
Before beginning any implementation, let us first
discuss the organization we will use for the source code files.
It makes sense to store the code for each module in its own file or files.
the
Operands Module,
-
This module is divided into two submodules, each implemented
in its own file:
- you will write the code in
opnd.c for the functions with prototypes in
opnd.h
- and exponent.c will contain functions with prototypes in
exponent.h
(you have already written part of this in the previous homework)
the
Operators Module,
-
- you will write the code in
ops.c for the functions with prototypes in
ops.h.
the
Results Module,
-
This module is divided into two submodules, each implemented
in its own file:
- you will write the code in
compute.c for the functions with prototypes in
compute.h
- I have written the code in
presults.c and prototypes in
presults.h.
the
Display Module.
-
I have written the code for the Display module. I will only give
you the compiled module, display.o, with functions
with prototypes in
display.h.
and the
Driver Module
-
You will be writing 5 drivers in developing this project.
See the
implementation
for details.
In addition, we may be making use of functions provided in
chrutil.c
with prototypes in
chrutil.h.
Even with all this organization, implementing this project is a big
task. So we will take a bottom up approach - developing small
portions of the overall program, one at a time.
We will then test each portion using a "throw away" driver to
make sure it works before going on to the next part.
We will require you to develop and test your calculator in pieces as described
in the
implementation.
Test the program
to Overview.