Sie sind auf Seite 1von 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 the
following 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

Go to HYATT Hotel for Dinner


>RM1000

RM500 to RM1000

Dinner at ARENA JUSCO


Bank Account

< RM500

Dinner at 'JusanyWarung'

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 <RM500
Dinner at 'JusanyWarung'
End

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 exam
meaning that chances to get an A is zero. Else he may continue but chances to get grade A is not
100% 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 <80 %
Drop the class
ELSE
Continue
IF score final, did all homework and project well
Get A
ELSE
Not 100% get A
END IF
END IF
END

Assignment : Process Specifications and Structured Decision

~Fiveladyfly~

3 . A particular flower decides whether to open its petals in the following ways. Draw a Decision
Table 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
Whether
Open petals
Close petals

Daytime
Raining
Not Raining
x
x

Raining
x

Simplified
Whether
Open petals
Close petals

Decision Tree

Daytime
Raining
Not Raining
x
x

Night
x

Night
Not Raining
x

Assignment : Process Specifications and Structured Decision

~Fiveladyfly~

4. A company supplies firm called True Disk has set up accounts for countless businesses in KL.
True Disk sends out invoices monthly and will give discounts if payments are made within 10 days.
The discounting policy is as follows : If the amount of the order for computer supplies is greater than
$1000, subtract 4 percent for order; if the amount is between $500 and $1000, subtract 2 percent
discount; if the amount is less than $500, do not apply any discount. All orders made via web
automatically receive an extra 5 percent discount. Develop a Decision Table, Decision Tree and
Structure English for True Disk discounting decisions, for which the condition alternatives are
limited to Y and N.

Decision Table
Initial
Order
Payment
Amount
Action
Minus 4%
Minus 2%
No Discount
Extra 5%

Normal
< = 10 days
>1000 500- <500
1000

Web

> 10 Days
>1000 500- <500
1000

< = 10 days
> 10 Days
>1000 500- <500 >1000 500- <500
1000
1000
x

x
x

x
x

x
x

Simplified
Order
Payment
Amount

Normal
< = 10 days
>1000 500- <500
1000
Minus 4%
x
Minus 2%
x
No Discount
x
Extra 5%

> 10 Days
-

Web
< = 10 days
>1000
500<500
1000
x
x
x
x
x
x

> 10 Days
-

Assignment : Process Specifications and Structured Decision

Decision Tree

Structure English
If payment made <=10 days
If amount > $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 discount
End If
End

~Fiveladyfly~

Das könnte Ihnen auch gefallen