210 likes | 450 Views
Chapter 8 Structuring Requirements. Logic Modeling. Agenda. Overview of Requirements Structuring Logic & Event-Response Modeling Structured English Decision Tables Decision Trees Exercises. Learning Objectives. Use Structured English, decision tables, decision trees for logic modeling
E N D
Chapter 8Structuring Requirements Logic Modeling
Agenda • Overview of Requirements Structuring • Logic & Event-Response Modeling • Structured English • Decision Tables • Decision Trees • Exercises
Learning Objectives • Use Structured English, decision tables, decision trees for logic modeling • Select among each logic modeling techniques
Structuring System Requirements • Models for • Data movement (DFD, process model) • Data structure and rules (ERD, business rules) • Processing logic and rules (this chapter) • Need all these types of models to get a more complete picture for code generation
Logic & Event-Response Modeling • Rules which govern the manipulation of data within system processes (typically primitive processes) • Rules which govern what actions are taken under what conditions/events • Common notations are: • Structured English • Decision trees • Decision tables
Modeling Logic with Structured English • Modified form of English used to specify the logic of information processes • Uses a subset of English • Action verbs • Noun phrases • No adjectives or adverbs • No specific standards
Structured English is used here to describe arithmetic operations.
Structured English is used here to describe invoking other processes.
Decision Tables What are they? When would they be useful (what situations or types of decisions?) How might a decision table be represented within programming code?
Modeling Logic with Decision Trees • A graphical representation of a decision situation • Decision situation points are connected together by arcs and terminate in ovals • Main components • Decision points represented by nodes • Actions represented by ovals • Particular choices from a decision point represented by arcs
Decision Tree for Prior Problem • Graphical tool--can be used to represent the same information as shown on the decision table • Nodes • Branches • How can decision trees be different than decision tables? • Construct a decision tree for decision table problem
Policy Modeling Example Travel Reimbursement Policy: First we determine if it is a local trip. If it is, we only pay mileage of 18.5 cents a mile. If the trip was a one-day trip, we pay mileage and then check the times of departure and return. In order to reimbused for breakfast, you must leave by 7am and return later than 10am; for lunch, leave by 11am and return later than 2pm; and for dinner, leave by 5pm and return later than 7pm. On a trip lasting more than one day, we allow hotel, taxi, and airfare, as well as meal allowances as indicated above. Write a decision table. Write a decision tree. Write structured English Which do you prefer? Why?
More Practice Exercises • Problems & Exercises 11, 13 (pp. 261) • Develop Structured English routine(s) • Develop decision table(s) • Develop decision tree(s)
Summary • In this chapter you learned how to: • Use structured English as a tool for representing steps in logical processes in data flow diagrams. • Use decision tables and decision trees to represent logical choice in conditional statements. • Select among structured English, decision tables, and decision trees.