| Section IV : Putting It All Together | Section I: User Interface Analysis - Giving Olympia Choices | Section II: Functional Decomposition of 'main' | Section III: C++ Code |
|
Table of Contents
Learning C++:
An Index of Entry Points
2. The A reference document on the basic elements of C++.
3. The Patterns
|
A. Completing the Program
Once you have finished designing and coding this program yourself,
you are encouraged to read carefully the code
provided here. If you discover differences,
do not automatically assume that your design or code needs to
be changed. There is more than one way to write a program. Analyze
the differences you find and ask the following questions:
Do your design and code represent a different way of interfacing
with the user?
Do your design and code handle the same situations or possible
problems? Do they handle more situations or less? For example,
which design does a better job of handling incorrect user entries?
B. Final Thoughts
Whatever 'main' you write, in the end, of course, you still need to put it all together, just as we did in chapter five. You should follow the same instructions to get this program to work that you used to get the program from chapter five running. (Borland C++ users, review the document "BorlandProject.htm".) Remember that the only way to really make sure a program works is to run it and carefully examine its outputs given different inputs. If you want to run the code found in this chapter, here are the necessary files:
|