Ch5: Software Specification
Data Flow Diagrams
DFDs: Structured Analysis/Structured Design Structured Analysis/Structured Design (SA/SD): Supported by many CASE tools. Documented in many popular books. Influenced many other design methods.
DFDs: Objectives Avoiding the cost of:
DFDs: Graphical Notation Symbols to represent external entities i
DFDs: Graphical Notation Data flow: A path of a particular type of data
DFDs: Graphical Notation Functions/Processes: Transform an input data flow to an output data flow
DFDs: Graphical Notation Data store: Data/information store
DFDs: Levels DFDs can be drawn at multiple levels: Topmost level of DFD is called the Context diagram. Context diagram: Level 1 DFD:
DFDs: Levels Level 2 DFD: Each process in a Level 2 DFD can be further exploded to form a Level 3 DFD and so on.. Top-down expansion: Usually not advisable to go beyond Level 3 DFD.
DFDs: Levels When to stop expanding?
DFDs: Illegal construction
DFDs: Hints for construction
DFDs: Construction Method Start from the context diagram Input Output 1 1 Input information Output 2 2 ... ... system Input n Output m
DFDs: Construction Method Proceed with refinements until elementary functions are reached. Preserve balance I A O A3 H J I A1 A4 A6 K P Q M A2 S A5 N R A7 O K K2 B2 M B1 K3 K1 N B4 T B3 Ag K4
DFD: Course Registration System Consider a course registration system. When a student provides a prioritized list of courses and other information to the system, this information is transformed into a list of preferences. The list of preferences is used to verify the eligibility of the students using the student records and the course prerequisites. If the student is eligible to register for the courses he/she desires, then the student is enrolled in those courses, and the class schedule is communicated back to the student. In addition, the system also compiles the list of students enrolled in each class using the registration information for each student. This list is then given to the faculty. The list is also forwarded to the registrar so that a classroom of an appropriate capacity can be allocated depending on the number of students enrolled.
DFD: Course Registration System Context Diagram for Course Registration System Courses & other info. Faculty Students Registration Process Class schedule Class list Registrar
DFD: Course Registration System Level 1 DFD Students Individual Course Registration Information Courses & Other info. 2. Compile & Distribute Information 1. Enroll Students Registrar Schedules Class Lists Students Faculty Note: External entity Students is replicated to avoid crossing lines
DFD: Course Registration System Level 2 DFD Courses & Other info. Student Records Course Prereqs 1.1 Obtain Student Preferences 1.2 Check Eligibility List of Preferences Eligible Students 1.3 Enroll Students in Classes Individual course registration information