Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami."— Presentation transcript:

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

2 2 D. Behavioral Models

3 3 1. Activity Diagrams

4 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.

5 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.

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

7 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

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

9 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.

10 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.

11 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.

12 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.

13 Solution 13

14 14 2. State Diagrams

15 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.

16 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.

17 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.

18 Solution 18

19 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.

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

21 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.

22 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.

23 Reference 23  Fowler, Martin. UML distilled. Addison-Wesley Professional, 2004.  Schmuller, Joseph. Sams teach yourself UML in 24 hours. Sams publishing, 2004. ntroduction_to_uml_sequence_diagrams/ utorial/


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

Similar presentations


Ads by Google