Pseudo code algorithm: Using the defining diagram, the algorithm can be constructed.
The processing component of the diagram specifies the actions to be performed to complete this program. The solution algorithm is follows:
Calculate architects fee
1.Prompt for building cost
2. Get building cost
3. Remainder = building cost - $5,000.00
41 IF remainder < $80,000.00 THEN architects fee = ($5,000.00 * 8%) + (remainder * 3%)
ELSE
Architects fee = ($5,000.002 * 8%) + (remainder * 2.5%)
ENDIF
Display "architect's fee is " architects fee
END
C) Desk Checking of the algorithm:
1. Choose input data:
Two sets of valid character will be used to check the algorithm, the $40,000 as first set, and $100,000 as the second set.
| First data set | Second data set |
Building cost | $40,000 | $100,000 |
2. Expected Result:
The expected results for the two sets of test cases are given below:
| First data set | Second data set |
Architects fee | $1,450 | $2,775 |
3. Desk check table:
Set up a table of variable names and then pass each test data set through the solution algorithm, statement by statement. Using the algorithm line numbers as indicated.
| Statement | Building cost | Remainder | Architects fee |
First pass | Get | $40,000 | | |
| Remainder | | $35,000 | |
| IF | | | $1,450 |
| Display | | | Yes |
Second pass | Get | $100,000 | | |
| Remainder | | $95,000 | |
| IF | | $2,775 | |
| Display | | | Yes |
4. Comparing expected and actual results:
The expected results matches the actual results obtained for each set of data.