1 / 22

Logic Modeling

Logic Modeling. MIS 322. Why do we need Logic Modeling? Lets look at the following DFD. Why do we need Logic Modeling? (contd.). DFDs are very good for identifying processes, but they do not show the logic inside the processes What occurs within a process?

zona
Download Presentation

Logic Modeling

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Logic Modeling MIS 322

  2. Why do we need Logic Modeling?Lets look at the following DFD

  3. Why do we need Logic Modeling? (contd.) • DFDs are very good for identifying processes, but they do not show the logic inside the processes • What occurs within a process? • How is data input converted in to output? • Processes in DFDs appear as little more than black boxes • It is important to understand the structure and functionality of a system’s processes before it can be translated into a programming language

  4. What is Logic Modeling? • It involves the representation of the internal structure and functionality of the processes on data flow diagrams • It is effective for communicating with users (who provide the business logic) and the programmers (who implement this logic into a programming language) (Whitten, Bentley, and Dittman 2004)

  5. Logic Modeling Approaches • Structured English to represent process logic • Decision Tables • Decision Trees

  6. Structured English a technique for representing the "processing" contents of a DFD process It has the advantages of natural English and the rigor of some of the programming language tools (Whitten et al. 2004) Example... • Show processing logic for a bank's service charge calculation • Process: Calculate Customer Service Charge

  7. Example of one form of the process READ summary of customer monthly balances BEGIN IF IF daily-balance is < 300 for any given day THEN set service-charge to $5 ELSE set service-charge to $0 END IF

  8. CONDITIONAL STATEMENTS READ Quantity-in-stock SELECT CASE CASE 1 (Quantity-in-stock greater than Minimum-order-quantity) DO nothing CASE 2 (Quantity-in-stock equals Minimum-order-quantity) DO nothing CASE 3 (Quantity-in-stock is less than Minimum-order quantity) GENERATE new order CASE 4 (Stock out) INITIATE emergency re-order routine END CASE

  9. REPETITION DO READ Inventory records BEGIN IF IF Quantity-in-stock is less than Minimum-order-quantity THEN GENERATE new order ELSE DO nothing END IF UNTIL End-of-file

  10. Process 1.0 -- Update Inventory Added DO READ next Invoice-item-record FIND matching Inventory-record ADD Quantity-added from Invoice-item-record to Quantity-in-stock on Inventory-record UNTIL End-of-file

  11. Process 2.0 -- Update Inventory Used DO READ next Stock-item record FIND matching Inventory-record SUBTRACT Quantity-used from Stock-item-record from Quantity-in-stock UNTIL End-of-file

  12. Process 4.0 -- Generate Payments READ Today’s-date DO SORT Invoice-records by Date READ next Invoice-record BEGIN IF IF Date is 30 days or greater than Today’s-date THEN GENERATE Payments END IF UNTIL End-of-file

  13. DECISION TABLES a matrix representation of the logic of a decision • ACTION STUBS • The part of a decision table that lists the actions that result for a given set of conditions. • CONDITION STUBS • The part of a decision table that lists the conditions relevant to the decision. • RULES • The part of a decision table that specifies which action items are to be followed for a given set of conditions.

  14. Condition Stubs Action Stubs

  15. CONSTRUCTING DECISION TABLES 1. Name the conditions and the values each condition can assume 2. Name all possible actions that can occur 3. List all possible rules 4. Define the actions for each rule 5. Simplify the decision table

  16. INDIFFERENT CONDITION In a decision table, a condition whose value does not affect which actions are taken for two or more rules.

  17. DECISION TREES A graphical representation of a decision situation in which decision points (nodes) are connected together by arcs (one for each alternative decision) and terminate in ovals (the action which is the result of all the decisions made on the path that leads to that oval).

  18. Sunday Sleep 2 more hours 2 Weekday Yes Time to get up Saturday 1 No Sleep 1 more hour Legend: 1) Sun up? 2) What day is it? Go back to sleep

More Related