I l@ve RuBoard Previous Section Next Section

7.3 Code Design

After the preliminary specification has been approved, you can start designing code. In the code-design phase, you plan your work. In large programming projects involving many people, the code would be broken up into modules for each programmer. At this stage, file formats are planned, data structures are designed, and major algorithms are decided upon.

This simple calculator uses no files and requires no fancy data structures. What's left for this phase is to design the major algorithm, which we can outline in pseudocode, a shorthand halfway between English and code. In pseudocode, our code design looks like this:

Loop 
  Read an operator and number 
  Do the calculation 
  Display the result 
End-Loop 
    I l@ve RuBoard Previous Section Next Section