Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.

Slides:



Advertisements
Similar presentations
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 9 Slide 1 Appendix 3 Object-Oriented Analysis and Design.
Advertisements

Information System Design IT60105
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 8 Slide 1 System models.
SE-565 Software System Requirements More UML Diagrams.
Unified Modeling Language
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Software Engineering EKT 420. What is Activity Diagram Activity diagrams are graphical representations of workflows of stepwise activities and actions.
Software Engineering 8. System Models.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
Activity Diagram.
Object-Oriented Software Engineering Practical Software Development using UML and Java Chapter 8: Modelling Interactions and Behaviour.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Chapter 5 – System Modeling
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
Chapter 7 System models.
System models l Abstract descriptions of systems whose requirements are being analysed.
Pertemuan 19 PEMODELAN SISTEM Matakuliah: D0174/ Pemodelan Sistem dan Simulasi Tahun: Tahun 2009.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
Activity diagrams. Introduction ● Activity diagrams are a behavioural model that represent the dynamics of the system. ● An activity diagram is essentially.
7 Systems Analysis and Design in a Changing World, Fifth Edition.
9-1 © Prentice Hall, 2007 Chapter 9: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Course Instructor: Kashif Ihsan 1. Chapter # 3 2.
Introduction to UML CS A470. What is UML? Unified Modeling Language –OMG Standard, Object Management Group –Based on work from Booch, Rumbaugh, Jacobson.
System Decomposition Overview. Data Flow Diagrams Despite the name “Data Flow Diagrams”, DFD have a process, rather than a data, focus We represent all.
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
Systems Analysis and Design in a Changing World, Fourth Edition
7-1 © Prentice Hall, 2007 Topic 7: Analysis Classes Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey.
Chapter 3: Introducing the UML
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Systems Analysis and Design in a Changing World, Fourth Edition
Business Process and Functional Modeling
Analysis Classes Unit 5.
Tools Of Structured Analysis
Chapter 6 Structuring System Requirements: Process Modeling
Chapter 5 System modeling
Course Outcomes of Object Oriented Modeling Design (17630,C604)
IS 334 information systems analysis and design
Problem Solving How do we attack a large problem?
Unified Modeling Language
Chapter 9 Structuring System Requirements: Logic Modeling
Activity and State Transition Diagram
System Process Modeling
System Modeling Chapter 4
Process & Logic Modeling
Abstract descriptions of systems whose requirements are being analysed
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
Business System Development
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
Chapter 6 Structuring System Requirements: Process Modeling
System models October 5, 2005.
Chapter 9 Structuring System Requirements: Logic Modeling
Week 12: Activity & Sequence Diagrams
Chapter 9 Structuring System Requirements: Logic Modeling
BPMN - Business Process Modeling Notations
CS310 Software Engineering Dr.Doaa Sami
Chapter 11 Describing Process Specifications and Structured Decisions
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 9 Structuring System Requirements: Logic Modeling
Appendix 3 Object-Oriented Analysis and Design
Presentation transcript:

Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami

2 D. Behavioral Models

3 1. Activity Diagrams

Activity Diagram  An activity diagram is a Data-driven Model. 4  An activity diagram is a Data-driven Model.  An activity diagram is used to display the sequence of activities.  Activity diagrams show the workflow from a start point to the finish point, include details of many decision paths that exist in progression of events contained in the activity.  They may be used to detail situations where parallel processing may occur in the execution of some activities.

Activity elements that make up the activity. 5  Activity: it is shown as a round-cornered rectangle enclosing all the actions, control flows and other elements that make up the activity.

Action 6  An Action represents a single step within an activity. Actions are denoted by round-cornered rectangles. Perform an action

Control Flow arrowhead. 7  A Control Flow shows the flow of control from one action to the next. Its notation is a line with an arrowhead. Send Accept payment payment

Initial Node 8  An Initial or Start Node is depicted by a large black spot, i.e. filled circle. action

Final Node 9  There are two types of Final Node: The Activity Final Node is depicted as an empty circle with a dot inside it. It denotes the end of all control flows within the activity. The Flow Final Node is depicted as an empty circle with a cross inside it. It denotes the end of a single control flow.

Decision and Merge Nodes 10  Decision Nodes and Merge Nodes have the same notation: a diamond shape but with opposite directions of arrowheads. They can both be named.  The control flows coming away from a decision node will have guard conditions which will allow control to flow if the guard condition is met.

Fork and Join horizontal or vertical bar (dependent on whether the 11  Forks and Joins have the same notation: either a horizontal or vertical bar (dependent on whether the control flow is running left to right or top to bottom).  They indicate the start and end of concurrent threads of control.  Fork: denotes the beginning of parallel activity.  Join: denotes the end of parallel processing.

Example: Creating Document Activity 12 Open the word processing package. Create a file. Save the file under a unique name within its directory. Type the document. If graphics are necessary, open the graphics package, create the graphics, and paste the graphics into the document. If a spreadsheet is necessary, open the spreadsheet package, create the spreadsheet, and paste the spreadsheet into the document Save the file. Print a hard copy of the document. Exit the word processing package.

Solution 13

14 2. State Diagrams

State Diagrams  A State diagram is an Event-driven Model. 15  A State diagram is an Event-driven Model.  State diagrams show system states and events that cause transitions from one state to another.  State diagrams do not show the flow of data within the system but may include additional information on the computations carried out in each state.

State Diagrams Cont. 16  In UML state diagrams, rounded rectangles represent System States.  They may include a brief description (following ‘do’) of the actions taken in that state.  The labeled arrows represent Stimuli that force a transition from one state to another.  Start and End States indicated by using filled circles, as in the activity diagrams.

State Diagram Example  A very simple microwave oven system: 17  The microwave has a switch to select full or half power, a numeric keypad to input time, a start/stop button, and an alphanumeric display.  We assumed that the sequence of actions using the microwave is: 1. Select the power level (either half power or full power). 2. Input the cooking time using a numeric keypad. 3. Press Start and the food is cooked for the given time.  For safety reasons, oven should not operate when door is open.

Solution 18

Example Software Engineering Behavioral Diagrams

Example Software Engineering Behavioral Diagrams

When to Use Statecharts They are good at describing the behaviour of an object across several scenarios of use. They are not good at describing behaviour that involves a number of collaborating objects (use interaction diagrams for this). Not usually worthwhile to draw a statechart for every class in the system. Use them only for those classes that exhibit interesting behaviour. Software Engineering Behavioral Diagrams

Data-Flow Diagrams Data-flow diagrams describe systems as collections of data that are manipulated by functions. Data can be organized in several ways: They can be stored in data repositories, they can flow in data flows, and they can be transferred to or from the external environment.

Symbols Used for Constructing DFDs There are different types of symbols used to construct DFDs: Function symbol: External entity: Data-flow symbol: Data-store symbol: Output Symbol:

Example Construct a DFD that describes the arithmetic expression (a + b) * (c + a * d). Assume that the data a, b, c, and d are read from a keyboard and the result is printed.

Solution

Example Construct a DFD that describes a simplified information system for a public library The data and functions shown are not necessarily computer data and computer functions. The DFD describes physical objects, such as books and shelves, together with data stores that are likely to be, but are not necessarily, realized as computer files.

Solution

A Supermarket DFD

Levels of a DFD The initial level is called the context level or fundamental system model or a 0-level DFD. If we expand the 0-level processes then we get the 1st-level DFD and if we further expand the 1st-level processes then we get the 2nd-level DFD and so on.

General Guidelines for Constructing DFDs Remember that a DFD is not a flowchart. All names should be unique. Processes are always running; they do not start or stop. All data flows are named. Give unique names to all the processes and external entities.

General Guidelines for Constructing DFDs Avoid complex DFDs (if possible). Every process should have a minimum of one input and one output. Only data needed to perform the process should be an input to the process. The direction of flow is from source to destination.

Decision Tables Decision tables provide a mechanism for recording complex decision logic. A decision table is segmented into four quadrants: Condition stub and Condition entry. Action stub and action entry.

Basic Elements of a Decision Table

Limited Entry Decision Table

An Ambiguous Decision Table

An Ambiguous Decision Table If more than one decision rule has identical (Y, N, -) entries, the table is said to be ambiguous. Ambiguous pairs of decision rules that specify identical actions are said to be redundant, and those specifying different actions are contradictory.

An Incomplete Decision Table A decision table is complete if every possible set of conditions has a corresponding action prescribed. Failure to specify an action for any one of the combinations results in an incomplete decision table.

An Incomplete Decision Table

Example A computer-based system performs two actions (A1 and A2) based on the status of 3 switches. If at least one of the three switches is ON, it performs A1. If at least two of the switches are ON, it performs A2. Construct a decision table for the system. Is the decision table complete? Why? Is there any contradictory or redundant rules? Why?

Solution 1 2 3 4 5 6 7 8 SW1 N Y SW2 SW3 A1 X A2

Library Requisition Example The Head of the Department (HOD) recommends books to be bought by the Library. If funds are available, then the books are bought. In case funds don’t permit, a textbook is kept waitlisted for purchase during the next year, whereas the Library returns the requisitions for all other books to the Head of the Department.

Library Requisition Flowchart

Decision Table for Library Requisition

Advantages of Decision Tables Decision rules are clearly structured. Mangers can be relieved from decision-making. Consistency in decision-making. Communication is easier between managers and analysts. Documentation is easily prepared, changed, or updated.

Advantages of Decision Tables Easy to use. Easier to draw or modify compared to flowcharts. Facilitate more compact documentation. Easier to follow a particular path down one column than through complex and lengthy flowcharts.

Disadvantages of Decision Tables Impose an additional burden. Do not depict the flow. Not easy to translate. Cannot list all the alternatives.

Model-Driven Engineering 19  Model-Driven Engineering (MDE): is an approach to software development where models rather than programs are principal outputs of development process. Programs that execute on a hardware/software platform are then generated automatically from the models.  Proponents of MDE argue that this raises the level of abstraction in SWE, so that engineers no longer have to be concerned with programming language details.

Model Driven Architecture 20  Models at different levels of abstraction are created. From a high-level, platform independent model, it is possible, to generate a working program without manual intervention.  Model-driven engineering (MDE) has its roots in model- driven architecture (MDA).  MDA focuses on the design and implementation stages of software development whereas MDE is concerned with all aspects of the software engineering process.

Summery and external actors; sequence diagrams add more 21  A model is an abstract view of a system that ignores system details. Complementary system models can be developed to show the system’s context, interactions, structure and behaviour.  Use case diagrams and sequence diagrams are used to describe the interactions between users and systems in the system being designed.  Use cases describe interactions between a system and external actors; sequence diagrams add more information to these by showing interactions between system objects.

Summery 22  Class diagram is used to define the static structure of classes in a system and their associations.  Activity diagrams maybe used to model processing of data, where each activity represents one process step.  A State diagrams show system states and events that cause transitions from one state to another.  Model-driven engineering is an approach to SW development in which a system is represented as a set of models that automatically transformed to executable code.

Reference 23  Fowler, Martin. UML distilled. Addison-Wesley Professional, 2004.  Schmuller, Joseph. Sams teach yourself UML in 24 hours. Sams publishing, 2004. http://www.tracemodeler.com/articles/a_quick_i ntroduction_to_uml_sequence_diagrams/ http://www.sparxsystems.com/resources/uml2_t utorial/