Requirements Specification with Data Flow Diagrams COP 4331

  • Slides: 15
Download presentation
Requirements Specification with Data Flow Diagrams COP 4331 and EEL 4884 OO Processes for

Requirements Specification with Data Flow Diagrams COP 4331 and EEL 4884 OO Processes for Software Systems Development © Dr. David A. Workman School of EE and CS University of Central Florida January 29, 2007 Revised: February 10, 2009 (c) Dr. David A. Workman

Formal DFDs • Symbol Vocabulary – – External Interfaces: data portals defined at the

Formal DFDs • Symbol Vocabulary – – External Interfaces: data portals defined at the system boundary; interfaces where external data enters or leaves the system. ; used to define interfaces with other existing systems that supply or consume data transformed by the system being modeled. External interfaces could also represent interactive users (actors). Processes (functions): functional nodes that transform data carried by in-flows into data defined by out-flows; no data flows or flow components pass thru unchanged. External Interface Process Nodes Stores: internal system data storage areas or devices; data enters and leaves unchanged. Data Flows: conduits or channels or some other transport mechanism for data; composite or atomic “infopks. ” February 10, 2009 Store source (c) Dr. David A. Workman Data id sink 2

Formal DFDs See ‘Notes’ Page Context Diagram (Level - 0 DFD) Level 0: Mc.

Formal DFDs See ‘Notes’ Page Context Diagram (Level - 0 DFD) Level 0: Mc. Donalds Restaurant External Interface E A B F The SYSTEM C External Interface February 10, 2009 G D (c) Dr. David A. Workman External Interface 3

Formal DFDs See ‘Notes’ Page Level 1: The first level System decomposition. A F

Formal DFDs See ‘Notes’ Page Level 1: The first level System decomposition. A F Process 1. 0 B Process 3. 0 r Store u C v r = (s, t) Store February 10, 2009 t p Process 4. 0 x D s y Process 2. 0 E z w Process 5. 0 z = (x, y) (c) Dr. David A. Workman G 4

Formal DFDs Level 2 : The first level System decomposition. 1. 0 : Process

Formal DFDs Level 2 : The first level System decomposition. 1. 0 : Process Refinement B Process 1. 1 A Process 1. 4 Aua Store ua Process 1. 2 r ubc ub Process 1. 3 ubd Process 1. 5 y u February 10, 2009 (c) Dr. David A. Workman 5

Formal DFDs Level 0 (Context Diagram) Level 1 1. 0 2. 0 Level 2

Formal DFDs Level 0 (Context Diagram) Level 1 1. 0 2. 0 Level 2 2. 1 1. 2 February 10, 2009 (c) Dr. David A. Workman 6

Formal DFDs External Interface Process Nodes Store Process Nodes Store External Interface February 10,

Formal DFDs External Interface Process Nodes Store Process Nodes Store External Interface February 10, 2009 Rule: External Interfaces MUST ONLY be connected (via flows) to Process Nodes. Rule: Stores can only connect to Process Nodes on the same diagram; the same process may store and retrieve data from a given store, but the producing and consuming processes may be different. Stores should be introduced on highest level diagram where they are needed. Rule: Process nodes can connect by data flows to other processes, stores, or external interfaces. Although the same Process node and some other given node can be connected by both in-flows and out-flows, these flows must transmit different data. (c) Dr. David A. Workman 7

Formal DFDs • PRINCIPLES – All in-flow data to a process must be transformed

Formal DFDs • PRINCIPLES – All in-flow data to a process must be transformed in some way. The label and composition of out-flows from a process must be distinct from any in-flows (and other out-flows). Out-flow labels should reflect the effect of the process that produced them (e. g. “in-flow: hungry customer out-flow: satisfied customer”) X Process Nodes X Not Permitted – Although technically permitted, if the only purpose of a process node is to repackage constituents of composite in-flows to form out-flows, then the following notation should be used. X Splitting flows February 10, 2009 a a b b (c) Dr. David A. Workman X Merging of flows 8

Formal DFDs • PRINCIPLES – The sum of all data flows entering a DFD,

Formal DFDs • PRINCIPLES – The sum of all data flows entering a DFD, as defined by External Sources, must equal the sum of all data flows leaving a DFD, as defined by the External Sinks. The system defined by a DFD must not “add” information nor “delete” information - it only transforms it (and/or replicates it). – The sum of all data flow components entering a Process must equal the sum of the data flow components leaving a Process. This takes into account the fact that some data flows can be composite flows made up of more basic or primitive data elements. – Stores act as “buffers” or “repositories” of information. They do not alter data in any way. Once again, any data flowing into a Store must be retrievable without change from the Store as an out-flow, either as it was entered, or in the form of its components, ad in the case of composite in-flows. Component in-flows and composite out-flows are equally permissible. A Store should always have at least one in-flow and at least one out-flow. If this is not the case, then it probably should be modeled as an External Interface. – A DFD is complete and consistent if it is possible to track or traces every infopak that enters the System through an External Interface as part of an in-flow from its point of entry, through the Processes that manipulate it, and finally to the infopaks it has functionally affected as out-flows (or components of out-flows) leaving an External Interface. February 10, 2009 (c) Dr. David A. Workman 9

Example: Mac. Donald’s Customers Satiated Customers (having eaten Food and with no Money) Hungry

Example: Mac. Donald’s Customers Satiated Customers (having eaten Food and with no Money) Hungry Customers (with Money) Resturant Supplies & Raw Food Mac. Donald’s Restaurant (Customer Service) Trash (consumed supplies) Cash Receipts Bank February 10, 2009 CONTEXT DIAGRAM (c) Dr. David A. Workman Dumpster 10

Example: Mac. Donald’s See ‘Notes’ Page Dirty Trays Used Tray Trash Restaurant Supplies Empty

Example: Mac. Donald’s See ‘Notes’ Page Dirty Trays Used Tray Trash Restaurant Supplies Empty Bag Dumpster Waste Bin Open Empty Bag Open Full Bag 5. 0 Dump Trash Tied Full Bag February 10, 2009 Utensils 4. 0 Wash Trays Drink Dispenser Clean Trays Prepared Food Hungry Customer 2. 0 Deliver with Food Order 3. 0 Eat Hungry Food Customer (with Order, Satisfied No Cash Customer No Food) Hungry Customers (with Cash no Order) 1. 0 Take Order Helper Receipt | Order status Order Queries Restaurant Supplies & Food New Computer Food order System Cash Bank (c) Dr. David A. Workman 11

Example: Mac. Donald’s Dirty Trays Used Tray See ‘Notes’ Page 3. 0 Eat Food

Example: Mac. Donald’s Dirty Trays Used Tray See ‘Notes’ Page 3. 0 Eat Food Trash Supplies Empty Bag Dumpster Open Full Bag 5. 0 Dump Trash Tied Full Bag February 10, 2009 Supplies Clean Trays Cooked items Hungry Customer with Tray of Food Satisfied Customer Waste Bin Open Empty Bag 4. 0 Wash Trays Utinsels, Napkins Condiments, Drinks Customers 2. 0 Deliver Order Hungry Customer (with Order, No Cash No Food) Hungry Customer with Order# Order status 1. 0 Take Order Hungry Customer (with Cash no Order) New Food order Prepared Food Order Queries Hungry Customer Computer Order Processing System Cash Bank (c) Dr. David A. Workman 12

DFDs => OO Design Booch Methodology for Transforming DFDs into OO Design 1. 2.

DFDs => OO Design Booch Methodology for Transforming DFDs into OO Design 1. 2. 3. 4. 5. External Interfaces become boundary objects in the OO Design Data Flows become entity objects or object attributes in the OO Design Stores are modeled as Container objects (perhaps single objects). Process Bubbles at Level 1 are modeled as control objects. Process Bubbles at levels > 1 are modeled as methods of some class. February 10, 2009 (c) Dr. David A. Workman 13

Problem Scenario UCF provides a number of services to its students. At the beginning

Problem Scenario UCF provides a number of services to its students. At the beginning of a new semester, a student must register for class and pay tuition. Once registration is complete, textbooks and other course materials must be purchased at the bookstore. During the semester, good students attend class and acquire knowledge. At the end of the course good students take a final exam to determine their grade – the completed course with grade are entered into the registration system. After the degree program is successfully completed, good students graduate and leave UCF with a diploma. As an exercise for discussion, model this scenario as a DFD. February 10, 2009 (c) Dr. David A. Workman 14

UCF Education Textbook Publishers Course Materials Suppliers Alumni textbooks Registered students needing course materials

UCF Education Textbook Publishers Course Materials Suppliers Alumni textbooks Registered students needing course materials and/or textbooks New Students freshmen 2. 0 Purchase Course materials 1. 0 Register For Classes Repeat offenders Student Account transactions Transaction Confirmation February 10, 2009 Consumable Course Mat’ls Students needing degree credits Alumni with diploma 3. 0 Take Course 4. 0 Receive Degree Students having completed degree requirements Students needing more courses Student Account transactions Transaction Confirmation Bank (c) Dr. David A. Workman 15