Upload
brady-pink
View
215
Download
3
Embed Size (px)
Citation preview
Extra tutorials
Precision Tools System• Precision Tools System: Precision Tools sells a line of high-
quality woodworking tools. When customers place orders on the company’s Web site, the system checks to see if the items are in stock, issues a status message to the customer, and generates a shipping order to the warehouse, which fills the order. When the order is shipped, the customer is billed. The system also produces various reports.
2
(draw your context diagram)
3ACCOUNTING
WAREHOUSECUSTOMER
0
Order System
Order
Payment
In-StockRequest
StatusMessage
Invoice Shipping Confirmation
Shipping Order
Inventory Reports
Level-0 DFD
4
1.0
CheckStatus
2.0
IssueStatus
Messages
3.0
GenerateShipping
Order
ACCOUNTING
CUSTOMER WAREHOUSE
4.0
Manage Accounts
Receivable5.0
ProduceReports
Order In-Stock Request
Status Data
Status Message
PendingOrdersD1
Order Data
Order Data
Shipping Order
Shipping Confirmation
Invoice
Payment
Accounts ReceivableD2
Accounting Data Accounts Receivable Data
Order Data
Inventory Reports
2
Modeling Logic with Decision Tables • Procedure for Creating Decision Tables
• Name the condition and the values that each condition can assume.
• Name all possible actions that can occur.• List all possible rules.• Define the actions for each rule.• Simplify the table.
Q1: Create a decision table- Students Campus Burglar Alarm
When a burglar alarm sounds, if it is in one of students’ houses where alarm sounds every week, ignore it. Otherwise have a look outside and if the house looks not broken into and there is nobody moving inside it, ignore the alarm. Otherwise call police.
• List the resulting rules.
6
A1: Decision Table – Students Campus Burglar Alarm
Rule Stub
Rule 1 Rule 2 Rule 3 Rule 4
Condition Stub One of those houses Y Y N N
Suspicious activity Y N Y N
Action Stub Ignore X X X
Call Police X
7
A1: Simplified Decision Table – Students Campus Burglar Alarm
Rule Stub
Rule 1 Rule 2 Rule 3
Condition Stub One of those houses Y N N
Suspicious activity - Y N
Action Stub Ignore X X
Call Police X
8
A1: Resulting Rules- Students Campus Burglar Alarm
• Rule 1: if one of those houses then ignore• Rule 2: if not one of those houses and suspicious activity then call police• Rule 3: if not one of those houses and not suspicious activity then ignore
Note: rule 2 will work just as well if skip the first check:• Rule 2: if not suspicious activity then ignore
9