decision table tree englishstructure 2

Upload: 5lady

Post on 02-Jun-2018

241 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Decision Table Tree Englishstructure 2

    1/5

    Assignment : Process Specifications and Structured Decision ~Fiveladyfly~

    1. Write a Decision Tree and Structure English to solve the logic of the problem below:

    A student has a problem to decide on where to spend his dinner. Somehow it depends on thefollowing conditions:

    If his bank accounts shows that he got > RM1000; he will go to HYATT hotel special dinner.

    If his money is around RM500 and RM1000, then he shall have his dinner at ARENA, JUSCO

    If his money is less than RM500 then he has his dinner at justanyWarung

    Decision Tree

    Structure English

    If Bank Account >RM1000

    Go to HYATT Hotel for Dinner

    Else if Bank Acoount RM500 to RM1000

    Dinner at ARENA JUSCO

    Else if Bank Account RM1000

    RM500 to RM1000

    < RM500

    Go to HYATT Hotel for Dinner

    Dinner at ARENA JUSCO

    Dinner at 'JusanyWarung'

  • 8/10/2019 Decision Table Tree Englishstructure 2

    2/5

    Assignment : Process Specifications and Structured Decision ~Fiveladyfly~

    2 . A student has to decide whether to drop SCD2613 or continue. This is the condition:

    If attendance less than 80% then he better drop the class because he cannot sit for final exammeaning that chances to get an A is zero. Else he may continue but chances to get grade A is not100% unless he scored in the final exam and did all the homework and project correctly.

    Draw the Decision Tree and Structure English

    Decision Tree

    Structure English

    START

    IF attendance

  • 8/10/2019 Decision Table Tree Englishstructure 2

    3/5

    Assignment : Process Specifications and Structured Decision ~Fiveladyfly~

    3 . A particular flower decides whether to open its petals in the following ways. Draw a DecisionTable and Decision Tree to represent the logic of the case below:

    If it daytime and it is not raining it will open its petals

    In all other circumstances it will close its petals.

    Decision Table

    Initial

    Daytime NightWhether Raining Not Raining Raining Not RainingOpen petals xClose petals x x x

    Simplified

    Daytime NightWhether Raining Not Raining -Open petals xClose petals x x

    Decision Tree

  • 8/10/2019 Decision Table Tree Englishstructure 2

    4/5

  • 8/10/2019 Decision Table Tree Englishstructure 2

    5/5

    Assignment : Process Specifications and Structured Decision ~Fiveladyfly~

    Decision Tree

    Structure English

    If payment made $1000

    Discount = minus 4%

    Else if amount $500 to $1000

    Discount = minus 2%

    Else if amount < $500

    Discount = No discount

    End If

    If using web

    Discount = extra 5% + discount

    Else If special order

    No discountEnd If

    End