Solution:
Major Steps
1. Request Data
2. Determine score
3. Display score
Stepwise Refinement
1. Request Data
1.1 Request score
2. Determine score
2.1 IF score >= 35 THEN
2.1.1 score = score + 1
ELSE
2.1.2 score = score
3. Display score
1. Request Data
2. Determine score
3. Display score
Stepwise Refinement
1. Request Data
1.1 Request score
2. Determine score
2.1 IF score >= 35 THEN
2.1.1 score = score + 1
ELSE
2.1.2 score = score
3. Display score
Explanation:
If you remember how we make use of count in example five, then step 2.1.1 shouldn't confuse you.Step 2.1.2 can also be written like this: 2.1.2 Do nothing, why? Because score still have its value, since condition 2.1 is false.
SHARE THIS POST WITH YOUR FRIENDS...::
Tweet
0 comments:
Leave a Reply