(1) Use cases + Variables tables
First we need to think about the inputs and outputs (=> the use cases).
Then we think about variables and how we use them for the use cases.
The following tables illustrate two use cases (11+11= and 011+10=).
Step 1) Fill up the input column, then think and decide the outputs (textBoxOutput.Text) [for simplicity, use the windows calculator to determine the output]
Step 2) Think about the variables to be used and how they should be use for the use cases. Leave a few empty columns for adding more variables later on.
(2) flowcharts for “0”, “1”, “+” and “=” (partial)
Next, we use the variables table to draft our flowcharts:
(3) Coding for “0”, “1”, “+” and “=” (partial)
Use the previous exercise 3.2 where we have completed the following GUI and start coding:
Happy coding and debugging …
0 comments:
Post a Comment