Previous Section Main Menu Next Chapter

CHAPTER 6

GIVING OLYMPIA A BETTER INTERFACE
OR
USER INTERFACE DESIGN - SOME PRELIMINARY TECHNIQUES

Section IV : Putting It All Together Section I: User Interface Analysis - Giving Olympia Choices Section II: Functional Decomposition of 'main' Section III: C++ Code

A. Completing the Program
The design and coding of the rest of this problem is relatively straightforward. If you are unsure of what remains to be done, make a copy of the structure chart and put a mark next to each module we have discussed. The unmarked modules represent the functions you still need to design and code. In your own programs you are encouraged to use a similar process. As you design a module, put a 'D' next to the corresponding box in the structure chart. Later, as you write the code for a module, you can put a 'C' next to the corresponding box.

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:


B. Final Thoughts
Note that we have not made any changes to the contract class. This chapter focused strictly on the c ode that used this class. We could write many 'main' programs that used this same Contract class. In fact, one goal of the object-oriented approach is to promote code re-use.

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:

Top of Section Main Menu Next Chapter