From Analysis to Design. LTOOD/OOAD Verified Software Systems

Similar documents
Class Diagrams in Analysis

Software Service Engineering

Introduction to Software Engineering. 6. Modeling Behaviour

The Unified Modeling Language (UML)

Ch t 8 Chapter 8. System Models

S T R U C T U R A L M O D E L I N G ( M O D E L I N G A S Y S T E M ' S L O G I C A L S T R U C T U R E U S I N G C L A S S E S A N D C L A S S D I A

MSc programme (induction week) Department of Informatics INTRODUCTION TO UML

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

SOFTWARE DESIGN COSC 4353 / Dr. Raj Singh

Computer Science for Engineers

UML diagrams. Software artifacts include: SRS, SDS, test cases, source code, technical/user manual, software architecture, etc.

Lecture 5 STRUCTURED ANALYSIS. PB007 So(ware Engineering I Faculty of Informa:cs, Masaryk University Fall Bühnová, Sochor, Ráček

Lesson 11. W.C.Udwela Department of Mathematics & Computer Science

Software Development Methodologies

UNIT-I Introduction of Object Oriented Modeling

Basic Structural Modeling. Copyright Joey Paquet,

Modeling with UML. (1) Use Case Diagram. (2) Class Diagram. (3) Interaction Diagram. (4) State Diagram

16.1 Introduction... 2

Course 3 7 March

Object-Oriented Design

Exercise Unit 2: Modeling Paradigms - RT-UML. UML: The Unified Modeling Language. Statecharts. RT-UML in AnyLogic

Lecture 8: Use Case -Driven Design. Where UML fits in

Introduction to Unified Modelling Language (UML)

SOFTWARE ENGINEERING UML FUNDAMENTALS. Saulius Ragaišis.

INTRODUCTION TO UNIFIED MODELING MODEL (UML) & DFD. Slides by: Shree Jaswal

Engineering Design w/embedded Systems

Lecture Notes UML UNIT-II. Subject: OOAD Semester: 8TH Course No: CSE-802

XVIII. Software Architectures

Chapter 6: Entity-Relationship Model. The Next Step: Designing DB Schema. Identifying Entities and their Attributes. The E-R Model.

Unified Modeling Language (UML)

The OO Solution. Objects

The Next Step: Designing DB Schema. Chapter 6: Entity-Relationship Model. The E-R Model. Identifying Entities and their Attributes.

Represent entities and relations with diagrams

Object-Oriented Software Engineering Practical Software Development using UML and Java

Software Engineering I (02161)

An Introduction To Object Modeling System Concept for Object Modeling The Overall View Components of UML Diagram

Unified Modeling Language - UML

Object-Oriented Design

CHAPTER 1. Topic: UML Overview. CHAPTER 1: Topic 1. Topic: UML Overview

Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

SE 1: Software Requirements Specification and Analysis

CISC 322 Software Architecture

Darshan Institute of Engineering & Technology for Diploma Studies

Unified Modeling Language (UML)

The Unified Modeling Language User Guide

SOFTWARE MODELING AND DESIGN. UML, Use Cases, Patterns, and. Software Architectures. Ki Cambridge UNIVERSITY PRESS. Hassan Gomaa

UML: Unified Modeling Language

Chapter 2, Modeling with UML, Part 2

Interaction Modelling: Sequence Diagrams

Course "UML and Design Patterns" of module "Software Engineering and Design", version February 2011 (X)

Äriprotsesside modelleerimine ja automatiseerimine Loeng 7 Valdkonna mudel

The Unified Modeling Language. Asst.Prof.Dr. Supakit Nootyaskool IT-KMITL

Software Engineering Fall 2015 (CSC 4350/6350) TR. 5:30 pm 7:15 pm. Rao Casturi 09/29/2015

UML Primer. -Elango Sundaram

UNIT I. 3. Write a short notes on process view of 4+1 architecture. 4. Why is object-oriented approach superior to procedural approach?

Lecture 33 April 4, Unied Modelling Language. ECE155: Engineering Design with Embedded Systems Winter Patrick Lam version 1

Modeling Requirements

OMG Modeling Glossary B

Introduction to modeling. ER modelling

State Machine Diagrams

Business Process Modelling

UNIT-4 Behavioral Diagrams

What is UML / why. UML is graphical and notational representation for software system requirements analysis and design. (Software Engineering )

Entity Relationship Modelling

ArchiMate symbols for relating system elements

Enterprise Architect Training Courses

Chapter 10. Object-Oriented Analysis and Modeling Using the UML. McGraw-Hill/Irwin

Unified Modeling Language I.

Object-Oriented Analysis and Design. Pre-UML Situation. The Unified Modeling Language. Unification Efforts

Principles of Software Construction: Objects, Design and Concurrency. Just enough UML. toad

Chapter 2: Entity-Relationship Model

Lab Manual. Object Oriented Analysis And Design. TE(Computer) VI semester

Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page:

Interactions A link message

Course "Softwaretechnik Modeling with UML Stephan Salinger

Class diagrams. Modeling with UML Chapter 2, part 2. Class Diagrams: details. Class diagram for a simple watch

Conceptual Data Modeling by David Haertzen

Database Systems. Overview - important points. Lecture 5. Some introductory information ERD diagrams Normalization Other stuff 08/03/2015

XIX. Software Architectures

UML part I. UML part I 1/41

Sommerville Chapter 7 Fowler Chapters 1, 3, 5, and 6. Conceptual Modeling and Class Diagrams

IS 0020 Program Design and Software Tools

Chapter 4. Capturing the Requirements. 4th Edition. Shari L. Pfleeger Joanne M. Atlee

CS 451 Software Engineering

Object Oriented Modeling

Object-Oriented Systems Development: Using the Unified Modeling Language

Data Modeling During System Analysis. Logical Data Model Stages. What is Conceptual Database Design? Gathering Information for Conceptual

LABORATORY 1 REVISION

Introduction to UML. Danang Wahyu utomo

Data Model and Tool Support for a consistent Functional Verification Chain in Space Projects SEPS 2012, ESTEC

UML & OO FUNDAMENTALS CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 3 08/30/2011

LAB-03 BPMN Resource Perspective and Events

Course "Softwaretechnik" Book Chapter 2 Modeling with UML

06. Analysis Modeling


Process Modelling. Fault Tolerant Systems Research Group. Budapest University of Technology and Economics

Full file at

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

Today s Agenda UML. CompSci 280 S Introduction to Software Development. 1.Introduction UML Diagrams. Topics: Reading:

Transcription:

From Analysis to Design 1

Use Cases: Notation Overview Actor Use case System X System boundary UCBase «extend» UCExt Actor A UCVar1 UCVar2 Extending case Generalization «include» Actor B UCIncl Included case 2

Paths, Scenarios, Processes Use case definitions are mostly an overlay of several conditionally closely related paths. A certain path through a use case is called a scenario. A scenario shows a particular set and combination of conditions within the same use case, e.g., ordering some goods under scenario 1: All goes well. scenario 2: There are not enough goods. scenario 3: Credits are insufficient. Interaction Diagrams Processes involving different use cases are shown in workflows, e.g., from ordering to delivery and payment. Activity Diagrams 3

4

5

6

7

8

9

10

11

Interaction with External Systems Interaction with external systems can be represented in four ways: 1. Show each interaction with external systems in the diagram. 2. Only show use cases for external interaction, if the other system initiates the contact. 3. Only show system actors if they need the already identified use cases. 4. Disallow systems as actors, concentrate on users. Use external events to identify use cases not covered by actors. Find every possible event of the world outside needing a reaction. 12

Modeling System Structure 13

Class Diagrams in Analysis Notation required for: Classes Relations: Multiplicity Roles Associations Aggregation? Composition Generalization Objects 14

Three Views on OO-Modeling Conceptual view (analysis) classes represent the application concepts language and system independent few classes, few diagrams Design view (late analysis, early design) classes represent SW-interfaces describes the solution of difficult problems of the implementation structures the system in layers, subsystems and packages Implementation view (late design and programming) classes represent code in a programming language is directly mapped on the implementation example: mapping of associations Views are part of Unified Process, not of UML itself. 15

Analysis: How to find Classes? First cut: Identify classes by nouns Categorize the nouns Remove nouns and concepts which do not represent independent conceptual classes Choose meaningful and substantial class names Document each class in short (~1 defining sentence) 16

17

18

19

Analysis: Find Attributes Identify attributes following the noun method Check the attribute name Each attribute name should be a noun, chosen as concrete as possible, no homonym. Define the type of the attributes In the conceptual class diagram the type can remain unspecified. 20

Analysis: Find Associations Identify possible associations between objects In the relevant documents, find verbs and nouns identifying actions or processes. Identify the concerned classes for each association. Categorize these associations actions: e.g., drives car, books flight properties: e.g., has age general relations: e.g., depends on, is married to Delete non-conceptual associations Define association and role names if necessary Determine the multiplicity of each role of each association 21

Conceptual Modeling by Classes Definitional goals: conceptual perspective defining the application domain by capturing its relevant concepts (concrete or abstract ones) and representing them by classes provides language independence Representational means: class diagrams classes relationships object diagrams objects (as an instance of a class) references 22

Class Diagram A class diagram is a graphical representation of a static view on declarative, static elements. Class diagrams contain: classes relationships packages Relationship Package Sales & Distribution Class Customer Order 23

Class Diagram on Conceptual Level A class has name description (responsibility, job) attributes name description, optional: type (methods) Customer customerno :Int name :String Name Attribute Type Alternative, compact representation without details Customer 24

Three Cases of Relations A Relation can take the form of: Association Most general (n:mrelationship) Customer n m Order Aggregation Stronger relationship, one is part of the other Composition Order 1 * Position Even stronger than aggregation, also ties lifecylces together More details on the following slides. Company 1 * Department 25

Association An association is a semantic relationship between classes which concerns the connection (e.g., references) between its instances. Notation: name multiplicity description (extracted from use cases) Customer Multiplicity 1 * places Name Order An order is done by exactly one customer. Each customer can place none or several orders. 26

More Semantics on Classes and Relationships There is a need for non-structural semantic elements on associations, attributes, classes etc. Constraints are restrictions denoted by expressions. Notes are in natural language. They may also contain constraints. Constraints and notes can be used for annotating any element in UML diagrams. Customer customerno:integer {value > 0} 1 * {Σ orders >= $50} Order may be canceled Constraint Constraint Note 27

Association vs. Aggregation The following rules can give a hint that an association is an aggregation: Can the relationship be described by consists of or is part of? (Collection, container, whole & parts, group & members,...) Is the multiplicity on one side of the association 1 or 0..1 (only a vague indicator)? Is the association transitive and asymmetric? Are the part objects accessed exclusively by the aggregate object? Is the lifetime of the component restricted by the lifetime of the aggregate? 28

Aggregation vs. Composition Properties of aggregation: an aggregation is a specific semantic relationship between aggregate and component B. B is a part of A. Additional properties of composition: a composition is an aggregation with the additional property of dependent existence of the component exclusive aggregation (component can only be component of a single aggregate) Aggregation Order 0..1 * Position Aggregate Component Composition University 1 * ResearchGroup 29

Role A role has a name and describes the meaning of the classes participating in an association more precisely. Teaching field * can teach Available lecturer * Lecture Professor * * Teaching offer teaches Lecturer Role name Association name 30

Association Multiplicities: Summary The multiplicity of an association defines the valid range of values for the number of objects taking part in the association (cardinalities). Notation number number1..number2 number..* * Examples 1, 4 1..5, 2..10 0..*, 4..* * Meaning exactly this many [number1, number2] [number, infinity] 0..* 31

Generalization Generalization is a semantic relationship between a more general concept A (super class) and a more special concept B (sub class). For classes: Inheritance builds a taxonomy. Super class Taxonomy: a hierarchical classification of things Freelancer Employee Staff Employee Sub class Freelancer Staff Specialization Generalization 32

Object Diagrams (vs. Class Diagrams) An object diagram shows objects (instances) at a certain point in time. can also show states and relationships Elements of ODs: objects references a2: Article name= teacup name of the instance object hw: Customer customerno=14 name= Holm class name a1: Article name= teapot b: Order date=18.5.1999 (directed) Reference 33

Example: Associations Association Order * 1 Customer Multiplicities Order: Customers may issue several orders. Each order belongs to a customer. An order is never related to more than one customer. 34

Example: Generalization Order * Generalization 1 Customer Corporate Customer Personal Customer We distinguish corporate customers from personal customers, since corporate customers are billed monthly whereas personal customers need to prepay their orders with a credit card. 35

Example: More Associations Order 1 * 1 Customer Line item * Order Line * 1 Product Corporate Customer Personal Customer Order: We want our orders to be lined up product by product. Each line should contain the amount and the price of each product. 36

Example: Attributes & Operations Order datereceived isprepaid number:string price:money Attributes Customer name address We have customers who order our products. We distinguish corporate customers from personal customers, since corporate customers are billed monthly whereas personal customers need to prepay their orders with a credit card. We want our orders to be lined up product by product. Each line should contain the amount and the price of each product. 37

Example: Order - Full Class Diagram Order datereceived isprepaid number:string price:money Multiplicity: mandatory * 1 Association Generalization Constraint Customer name address Role name Line item Order Line 1 * quantity:integer price:money issatisfied:bool {If Order.customer.creditRating is poor, then Order.isPrepaid must be true} Attributes Corporate Customer contactname creditrating creditlimit * 1 * Product Personal Customer creditcard# Multiplicity: optional 0..1 Multiplicity: multi-valued Employee 38

Modeling System Behaviour 39

Modeling of System Behavior How do systems behave? Modeling system behavior is so much harder than modeling system structure Use cases scenarios/processes interaction diagrams workflows activity diagrams 40

Activity Diagrams Elements States Actions, Activities Transitions Branches, Merge Concurrency, Synchronization Swimlanes, Object Flow Signals 41

Role of Activity Diagrams in UML Legend: A delegates task A to B B Use Case Diagrams Visualization of high-level reaction to events Workflow presentation Activity Diagrams Refinement of timing and sequence State Diagrams Interaction Diagrams 42

Specification of Behavior Computer Science developed several models for behavior specification logic-oriented models: predicate transformers on pre- and post-conditions graph-oriented models: Goals Petri nets state machines activity diagrams Specification of state changes of an object (or an interaction) triggered by an external event or a received signal. Definition of protocols, i. e., legal sequences of operations of a class or an interface. 43

Activity Diagrams The states are action states or activity states and the transitions are fired (triggered) by the termination of activities. In activity diagrams the concept of state does not refer to a static situation, but to named clusters of acts. Example: Building a house State Choose site Transition Survey house 44

Transitions Transitions describe how to get from one state into another. Start state A transition is executed when the previous action or activity is terminated. Chose site Action or Activity Transition Survey House Final state 45

Action States and Activity States An action state in an activity diagram describes an atomic change of a system s state without temporary fine structure, e. g., an operation call or the calculation of a value. Action states cannot be decomposed. An activity state describes an enduring activity which can be interrupted and typically is described by a submachine (activity diagram). Activity state Action state Switch light on Work up bill index := lookup(e) Construct House 46

Activity States: Actions In activity states actions can be executed at the beginning (entry point) or end (exit point) of an activity. Point in time Construct House entry / call architect exit / pay architect Drive Car entry / radio on do / steer car exit / radio off Action 47

Additional Reference Book (from the I want to model X, how do I do that with UML? perspective) G. Booch, J. Rumbaugh, I. Jacobson. The Unified Modeling Language User Guide. Addison-Wesley 1999 48