DFD IT 323 Software Engineering 2 Tutorial 1

  • Slides: 24
Download presentation
DFD IT 323 - Software Engineering 2 Tutorial 1

DFD IT 323 - Software Engineering 2 Tutorial 1

Decomposition Style 0 The system 1. 0 A Function 1. 1 Activity of the

Decomposition Style 0 The system 1. 0 A Function 1. 1 Activity of the function 2. 0 Another Function 1. 2 Another activity of the function 2. 1 Activity of the function 2. 2 Another activity of the function 1. 1. 1 1. 2. 1. 1 2. 2. 1 1. 1. 2. 2 2. 1. 2 2. 2. 2 2. 1. 3 2. 2. 3 Task 1. 1. 3 Task Task Task 2. 1. 4 Task 2

Context Diagram Shows the boundaries of the system Shows the overall business process as

Context Diagram Shows the boundaries of the system Shows the overall business process as just ONE process Shows all the outside entities that receive information from or contribute information to the system No Data store 3

Level 0 Diagram Shows all the processes that comprise the overall system Shows how

Level 0 Diagram Shows all the processes that comprise the overall system Shows how information moves from and to each process Adds data stores 4

Level 1 Diagram Shows all the processes that comprise a single process on the

Level 1 Diagram Shows all the processes that comprise a single process on the level 0 diagram Shows how information moves from and to each of these processes Level 1 diagrams may not be needed for all level 0 processes 5

Guidelines for Drawing a Context Read the case study from start to finish a

Guidelines for Drawing a Context Read the case study from start to finish a number of times until you have a fair idea of what the system as a whole does. Try to make a list of potential external entities. A person or place is an external entity under two conditions. ◦ Firstly, if it gives something to the system without explanation of the processing involved in its creation. ◦ Secondly, if it receives something from the system with no explanation of what it does with it. Establish what data flows are sent to external entities from the system and what data flows are received into the system from them. Having identified external entities and flows to and from them, the context diagram can be drawn. 6

Guidelines for Drawing Level 0 Take one sentence at a time and decide if

Guidelines for Drawing Level 0 Take one sentence at a time and decide if it is background information or if it is an activity which must be represented by a process in the diagram. Processes can be identified by the verb in the sentence. Make a list of all potential processes Identify and list data flows ◦ group these potential processes so that you end up with approximately 3 to 10 processes. ◦ these are generally documents but could also be phone calls, physical items such as goods etc. Anything that moves around a system can be considered a data flow. Identify and list data stores. Having identified all the components of the DFD, draw the diagram using the appropriate conventions (notation). Validate the level 0 diagram against the context diagram to ensure that they are consistent. ◦ a difference in the number of flows or the names of those flows will result in the wrong system being modeled. 7

Guidelines for Drawing Level 1 For each level 0 process make a list of

Guidelines for Drawing Level 1 For each level 0 process make a list of subprocesses, each one of which will become a process on the corresponding level 1 diagram. Validate the level 1 diagram against the level 0 diagram to ensure that they are consistent. Remember the process identifier from the level 0 process is used as the first part of the identifier for the lower level processes. 8

Points to Remember when Drawing DFDs When drawing DFDs, you are concerned with the

Points to Remember when Drawing DFDs When drawing DFDs, you are concerned with the logical components of the system, i. e. what are the activities which when linked together make up the system under investigation as a whole. When listing processes, think of what activities are carried out, not who does them or where they are done. Make sure that the beginning and the end of a flow touch its source and destination. All flows must be labeled. No two flows on the same diagram can have the same name (unless they are identical). All words in a flow name must be connected by underscores, e. g. sales_invoice. Keep flow names short but meaningful. 9

Points to Remember when Drawing DFDs Make sure that no section of a diagram

Points to Remember when Drawing DFDs Make sure that no section of a diagram is separate from the rest, i. e. there must be a logical connection through the entire diagram. ◦ If one section is not joined to the rest then this part of the diagram will never be triggered and consequently the system the diagram is modeling will be incomplete and inaccurate. Make sure that the correct arrow type is used to join a process with a store: ◦ if a process is updating information the arrow head is at data store. ◦ if a process is retrieving information from a store then the arrow head is at the process. Make sure the processes are correctly numbered. Check the consistency of flows across diagrams (Balancing), ◦ The same number of flows coming in and out of a level 0 as a context and also that the names are the same. Make sure that each diagram is properly labeled i. e. its 'title' should be clearly stated. For example, 'Level 1 Order Processing'. 10

Q 1 11

Q 1 11

Q 1 No data store in context diagram 2. Payment- extra dataflow in level

Q 1 No data store in context diagram 2. Payment- extra dataflow in level -0 3. Customer data– from source to data store directly 4. Order- bidirectional dataflow 5. Order details & inventory data – wrong forked dataflow (different data) 6. Process 3. 0 – No output 12

Q 2 – Level 0 DFD for Textbook Inventory System 13

Q 2 – Level 0 DFD for Textbook Inventory System 13

Q 2 - Context DFD for Textbook Inventory System Payment 14

Q 2 - Context DFD for Textbook Inventory System Payment 14

Q 3 - Student Administration System : The enrolment process works as follows: Students

Q 3 - Student Administration System : The enrolment process works as follows: Students send in an application form containing their personal details, and their desired course. The university checks that the course is available and that the student has necessary academic qualifications. If the course is available the student is enrolled in the course, and the university confirms the enrolment by sending a confirmation letter to the student. If the course is unavailable the student is sent a rejection letter. 15

Q 3 - Student Administration System Context DFD for the Student Administration System ◦

Q 3 - Student Administration System Context DFD for the Student Administration System ◦ Step 1 Familiarize yourself with the case study. ◦ Step 2 (identify potential external entities) Student. ◦ Step 3 (identify flows to/from system and external entities) Student send: Application details Student receive: Confirmation/ rejection details 16

Q 3 - Student Administration System ◦ Step 4 (draw your context diagram) 17

Q 3 - Student Administration System ◦ Step 4 (draw your context diagram) 17

Q 3 - Student Administration System Draw a Level 0 DFD for the Student

Q 3 - Student Administration System Draw a Level 0 DFD for the Student Administration System. ◦ Steps 1 & 2 (identify potential processes) Verify availability, Enroll student, Confirm registration. ◦ Step 4 (identify data flows) Requested-courses, Accepted/rejected selection, registration, confirmation letter, open-course, coursedetails , course- enrollment, student-details, ◦ Step 5 (identify data stores) Course file , student file ◦ Step 6 (draw level 0 diagram) 18

Q 3 - Student Administration System 19

Q 3 - Student Administration System 19

Q 3 - Precision Tools System: Precision Tools sells a line of high-quality woodworking

Q 3 - 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. 20

Q 3 - Precision Tools System Context DFD for the Precision Tools System ◦

Q 3 - Precision Tools System Context DFD for the Precision Tools System ◦ Step 1 Familiarize yourself with the case study. ◦ Step 2 (identify potential external entities) Customer, Warehouse, Accounting ◦ Step 3 (identify flows to/from system and external entities) Customer sends: order, payment Customer receives: status message , invoice Warehouse sends: shipping confirmation Warehouse receives: in stock request, shipping order Accounting receives : inventory reports 21

Q 3 - Precision Tools System ◦ Step 4 (draw your context diagram) 22

Q 3 - Precision Tools System ◦ Step 4 (draw your context diagram) 22

Q 3 - Precision Tools System Draw a Level 0 DFD for the Precision

Q 3 - Precision Tools System Draw a Level 0 DFD for the Precision Tools System ◦ Steps 1 & 2 (identify potential processes) ◦ Check Status , Issue Status Messages, Generate Shipping Order, Manage Accounts Receivable, Produce Reports ◦ Step 4 (identify data flows) ◦ Order, In-Stock Request, Order Data, Status Message, Shipping Order, Order Data, Invoice , Shipping Confirmation, Payment, Accounting Data, Accounts Receivable Data, Order Data, Inventory Reports ◦ Step 5 (identify data stores) ◦ Pending Orders, Accounts Receivable ◦ Step 6 (draw level 0 diagram) 23

Q 3 - Precision Tools System 24

Q 3 - Precision Tools System 24