Learn how to generate lines of data in a decision table
automatically.
In this task, you enter rows of data in the
decision table by automatically generating lines. The principle of
dragging cells to complete other cells in the table is similar to
populating cells in an Excel spreadsheet.
To generate lines of data in the decision
table:
- In the MinimumAge decision table,
click the cell containing the entry New
York.
The cell displays a small black box.
- Move the cursor to the black box so that it changes to
a hand symbol.
- Hold down the Ctrl key and then click and drag the State cell down one row.
The row below is automatically populated with another
state from the domain, the minimum and maximum age intervals, and
the Boolean values in the Rental
Rejected column.
- Drag the Rhode Island cell
to generate two more rows, so that the State column
displays the following states:
- New York
- Rhode Island
- Massachusetts
- New Hampshire
- Change the Rental Rejected Boolean
values because they are not the same for each state:
- New York: 18–21: true; 21–25: false
- Rhode Island: 18–21: true; 21–25: true
- Massachusetts: 18–21: true; 21–25: true
- New Hampshire: 18–21: true; 21–25: false
When you finish, your table should look like the following
decision table:
- Add the following messages to the relevant Reason column cells. You can copy
and paste the messages directly into the table:
- New York [18-21]: In New York
state, customer must be 21 or more to rent a car.
- Rhode Island [18-25]: In Rhode
Island state, customer must be 25 or more to rent a car.
- Massachusetts [18-25]: In Massachusetts
state, customer must be 25 or more to rent a car.
- New Hampshire [18-21]: In New
Hampshire state, customer must be 21 or more to rent a car.
- Save your work.