Following the draft of the table from the previous post about decision tables, here is the final draft of the decision table used for testing the program. From the original 64, we condensed the table down by:
- eliminating columns where one action determined the whole outcome of the output, mainly:
- where s !> 1 is False and
- s is not an element of N is False
These actions are amalgamated into the first two columns of the rules, where anything after the False is replaced with a dash to signify that it doesn't matter what happens after, the same action will should always be executed. This greatly reduced the number of columns from 64 down to 14. Doing these reduced the redundancy when creating the test cases, resulting in the final table below.
LEGEND:
s = number of steps
N = Natural Numbers set
Ln = nth Location
CONDITIONS
|
RULES
| |||||||||||||
Col Number
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
s > 1
|
F
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
s ∈ N
|
-
|
F
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
T
|
s = n
|
-
|
-
|
F
|
T
|
T
|
T
|
T
|
T
|
F
|
F
|
F
|
F
|
F
|
T
|
Ln > Ln-1
|
-
|
-
|
T
|
F
|
T
|
T
|
F
|
F
|
T
|
F
|
F
|
T
|
F
|
T
|
Ln > 0
|
-
|
-
|
T
|
T
|
F
|
T
|
T
|
F
|
F
|
T
|
T
|
T
|
F
|
T
|
Ln ∈ N
|
-
|
-
|
T
|
T
|
-
|
F
|
F
|
-
|
-
|
T
|
F
|
F
|
-
|
T
|
ACTIONS
| ||||||||||||||
Error Message: Invalid input (# steps must be greater than 1)
|
X
| |||||||||||||
Error Message: Invalid input (not an integer)
|
X
|
X
|
X
|
X
|
X
|
X
| ||||||||
Error Message: Invalid Input (must be positive)
|
X
|
X
|
X
|
X
| ||||||||||
Error Message: Invalid Input (must be greater than previous)
|
X
|
X
|
X
|
X
|
X
|
X
| ||||||||
Prompt user for valid input
|
X
|
X
|
X
|
X
|
X
|
X
|
X
|
X
|
X
|
X
|
X
|
X
|
X
| |
Print valid output
|
X
| |||||||||||||
This is the condensed version of the table after going through a few drafts wherein we made small changes on the order and the amount of columns.
RULES COMBINATIONS EXPLAINED:
- Steps is not greater than 1
- Steps is not a whole, positive numerical number.
- The number of locations entered is not the same as the value of steps
- A location entered is less than a previous one
- A location entered is negative
- A location entered is not a whole, positive numerical number.
- A location entered is less than a previous one and it is not a whole, positive numerical number.
- A location entered is less than a previous one and is negative
- A location entered is negative and the number of locations entered does not equal the value of steps.
- A location entered is less than a previous one and there are not enough locations entered
- The number of locations entered is not enough, a location entered is less than a previous one and a location entered is not a whole numerical number.
- The number of locations entered is not enough, a location entered is less than a previous one and a location entered is not a positive numerical number.
- The number of locations entered is not enough, a location entered is less than a previous one and a location entered is a negative number.
- The steps entered is greater than 1 and is a whole, positive numerical number and if the locations entered equal the value of steps and each subsequent location entered is greater than the last and they are all whole, positive numerical numbers.