Decision Table - Exercise
Decision Table - Exercise
N
Simplified Decision Table
N
N -
N N
Prepare a decision table as given statements
below
• Condition:
– C1: Youth customer (age <18)
– C2: Customer is member
– C3: Transaction > $1000
• Action
– A1: Offer Discount 20%
– A2: Offer discount 5%
– A3: Offer discount 15%
– A4: Offer membership
Prepare the decision table
• If registered customer is below 18, with transaction of more
than $1000; customer deserves 15% discount.
• However, if customer has less than $1000, age below 18, not
yet registered; customer deserves only 5% and offer
membership
• If registered customer is 18 or older, with transaction of
more than $1000; offer 20% discount
• If new customer is 18 or older, with transaction of more than
$1000; offer membership and 15% discount
• If new customer aged older than 18 and has less than $1000;
offer only membership
Simplify table?
Conditions and Rules 1 2 3 4 5
C1: Youth customer (age <18) Y Y N N N
C2: Customer is member Y N Y N N
C3: Transaction > $1000 Y N Y Y N
Actions
A1: Offer Discount 20% X
A2: Offer discount 5% X
A3: Offer discount 15% X X
Conditions/Rules R1 R2 R3 R4 R5 R6 R7 R8
C1:Under RM500 Y Y Y Y N N N N
C2:Pay by cash Y N Y N Y N Y N
C3:Pay by Credit Card N Y N Y N Y N Y
C4:Unknown Customer Y Y N N Y Y N N
Actions:
Pay at counter/cashier X X X X
Check credit card legitimate X X X X
Call supervisor X X
Update Database X X X X
Conditions/Rules R1 R2 R3 R4 R5 R6
C1:Under RM500 - - Y Y N N
C2:Pay by cash Y Y N N N N
C3:Pay by Credit Card N N Y Y Y Y
C4:Unknown Customer Y N Y N Y N
Actions
Pay at counter/cashier X X
Check credit card legitimate X X X X
Call supervisor X X
Update Database X X X
Preferred
Customer? -- Y N N -- --
Paid Cash? -- -- Y N Y N
Free Delivery X X
Charge $5 X X
Charge $10 X X
Prepare decision table
Define a decision table for admission to the
master program:
• Accepted if Bachelor in Information system
• Accepted with Pre-master if Bachelor in
Business Administration or Computer Science
• Rejected if with No Bachelor degree
• Tuition Fee of RM7000 if Malaysians
• Tuition Fee of RM10500 if Non-Malaysian
Answer
Condition Stubs R R R R R R
1 2 3 4 5 6
C1 – graduated with Bachelor in Information System Y N Y N N N
C2 – graduated with Business Administration or Computer N Y N Y N N
Science
C3 – Malaysians Y Y N N Y N
C4 – Non-Malaysians N N Y Y N Y
Action Stubs
A1 – Rejected X X
A2 – Accepted X X
A3 – Accepted (with Pre-Master) X X
A4 – Tuition Fee is RM7500 X X
A5 – Tuition Fee is RM10500 X X
Answer (Simplified Table)
Condition Stubs R R R R R
1 2 3 4 5
C1 – graduated with Bachelor in Information System Y N Y N N
C2 – graduated with Business Administration or Computer N Y N Y N
Science
C3 – Malaysians Y Y N N -
C4 – Non-Malaysians N N Y Y -
Action Stubs
A1 – Rejected X
A2 – Accepted X X
A3 –Accepted (with Pre-Master) X X
A4 – Tuition Fee is RM7500 X X
A5 – Tuition Fee is RM10500 X X
Option 2
Condition Stubs R R R R R R
1 2 3 4 5 6
C1 – graduated with Bachelor in Information System Y N N Y N N
C2 – graduated with Business Administration or Computer N Y N N Y N
Science
C3 – Malaysians Y Y Y N N N
Action Stubs
A1 – Rejected X X
A2 – Accepted X X
A3 – Accepted (with Pre-Master) X X
A4 – Tuition Fee is RM7500 X X
A5 – Tuition Fee is RM10500 X X
Answer 2 (Simplified Table)
Condition Stubs R R R R R
1 2 3 4 5
C1 – graduated with Bachelor in Information System Y N Y N N
C2 – graduated with Business Administration or Computer N Y N Y N
Science
C3 – Malaysians Y Y N N -
Action Stubs
A1 – Rejected X
A2 – Accepted X X
A3 – Accepted (with Pre-Master) X X
A4 – Tuition Fee is RM7500 X X
A5 – Tuition Fee is RM10500 X X
Option 3
Condition Stubs R R R R R R R R
1 2 3 4 5 6 7 8
C1 – graduated with Bachelor in Information System Y N N Y N N N N
C2 – graduated with Business Administration N Y N N Y N N N
C3 – graduated with Computer Science N N Y N N Y N N
C4 – Malaysians Y Y Y N N N Y N
C5 – Non-Malaysians N N N Y Y Y N Y
Action Stubs
A1 – Rejected X X
A2 – Accepted X X
A3 – Accepted (with Pre-Master) X X X X
A4 – Tuition Fee is RM7500 X X X
A5 – Tuition Fee is RM10500 X X X
Answer 3 (Simplified Table)
Condition Stubs R R R R R If you
1 2 3 4 5 noticed, no
C1 – graduated with Bachelor in Information System Y N Y N N matter if
the
C2 – graduated with Business Administration N - N - N
conditions
C3 – graduated with Computer Science N - N - N and
C4 – Malaysians Y Y N N - actions are
different,
C5 – Non-Malaysians N N Y Y -
but the
Action Stubs rules after
A1 – Rejected X simplified
A2 – Accepted X X will
ALWAYS be
A3 – Accepted (with Pre-Master) X X the same
A4 – Tuition Fee is RM7500 X X in total.
A5 – Tuition Fee is RM10500 X X (*with the
same
number of
actions)