< 上一個課程 | 下一個課程 >

作業 3:在表格中產生資料行

您將藉由自動產生字行,以便在決策表中輸入資料列。「拖曳資料格來填妥表格中的其他資料格」原則,類似於在 Excel 試算表的資料格中移入資料。

關於這項作業

您將在決策表建立資料列。

程序

  1. 在 MinimumAge 決策表中,按一下含有 New York 項目的資料格。

    您可以在資料格邊角看到一個黑色小方塊。

  2. 將游標移至黑色方塊,讓游標變成手狀符號。
  3. 按住 Ctrl 鍵,並按一下 State 資料格,然後往下拖曳一列。

    下方之列會自動移入該範圍中的另一州、最低和最高年齡的間隔,並在 Rental Rejected 直欄中移入布林值。

  4. 拖曳 Rhode Island 資料格,來產生二或多列,如此一來,State 直欄會顯示下列各州:
    • New York
    • Rhode Island
    • Massachusetts
    • New Hampshire
  5. 變更 Rental Rejected 布林值,因為每一州的布林值並不相同:
    • 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

    當完成時,您的表格與下列決策表相仿:

    顯示要變更值的 MinimumAge 決策表
  6. 在相關的 Reason 直欄資料格中新增下列訊息。您可以將訊息直接複製和貼到表格中:
    • 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。
  7. 儲存您的工作。

下一步

在下一項作業中,您將使用 Rule Designer 中的問題檢查特性,來尋找並更正決策表中的重疊資料錯誤。

< 上一個課程 | 下一個課程 >