Graphical Systems Modeling with UML / SysML Class diagrams



Similar documents
11 November

Using UML Part One Structural Modeling Diagrams

Umbrello UML Modeller Handbook

Chapter 8 The Enhanced Entity- Relationship (EER) Model

Chap 1. Introduction to Software Architecture

Java (12 Weeks) Introduction to Java Programming Language

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Introduction. UML = Unified Modeling Language It is a standardized visual modeling language.

Object Oriented Software Models

How To Design Software

CSI 333 Lecture 1 Number Systems

Tutorial - Building a Use Case Diagram

Data Analysis 1. SET08104 Database Systems. Napier University

Data Modeling Basics

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model

Analysis and Design with UML

Lectures 2 & 3: Introduction to Modeling & UML. Getting started

LAB 3: Introduction to Domain Modeling and Class Diagram

Lecture 12: Entity Relationship Modelling

Relational Schema Design

How to Make a Domain Model. Tutorial

Software Testing. Definition: Testing is a process of executing a program with data, with the sole intention of finding errors in the program.

Concepts of Database Management Seventh Edition. Chapter 9 Database Management Approaches

A Rational Software Whitepaper

Chapter 2: Entity-Relationship Model. Entity Sets. " Example: specific person, company, event, plant

CSC 742 Database Management Systems

Database Design Methodology

Object Oriented Programming. Risk Management

ATM Case Study OBJECTIVES Pearson Education, Inc. All rights reserved Pearson Education, Inc. All rights reserved.

Database Design Overview. Conceptual Design ER Model. Entities and Entity Sets. Entity Set Representation. Keys

Unit 2.1. Data Analysis 1 - V Data Analysis 1. Dr Gordon Russell, Napier University

Implementation Aspects of OO-Languages

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

Software Engineering. System Models. Based on Software Engineering, 7 th Edition by Ian Sommerville

Visio Tutorial 1BB50 Data and Object Modeling (DOM) How to make a UML Class Diagram 2004/2005

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

Pemrograman Dasar. Basic Elements Of Java

Association - Multiplicity. UML and Classes, Objects and Relationships [ 2] Notes. Notes. Association - Self. Association - Self

2. Conceptual Modeling using the Entity-Relationship Model

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

How to make a good Software Requirement Specification(SRS)

An Introduction To UML Class Diagrams Classes

1 Class Diagrams and Entity Relationship Diagrams (ERD)

Design and UML Class Diagrams

SYSML PLUGIN. version user guide

Object Oriented Design

COMP 378 Database Systems Notes for Chapter 7 of Database System Concepts Database Design and the Entity-Relationship Model

Semantics of UML class diagrams

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Chapter 6: Programming Languages

Design and UML Class Diagrams. Suggested reading: Practical UML: A hands on introduction for developers

Part 7: Object Oriented Databases

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

SQL Server An Overview

Design by Contract beyond class modelling

UML Class Diagrams. Lesson Objectives

Cúram Modeling Reference Guide

OKLAHOMA SUBJECT AREA TESTS (OSAT )

Introduction to ERD modelling using UML Class diagrams with Magicdraw (ver 17)

SysML Modelling Language explained

Mobile App Design Project #1 Java Boot Camp: Design Model for Chutes and Ladders Board Game

Communication Diagrams

The Entity-Relationship Model

Modeling the User Interface of Web Applications with UML

Principles of integrated software development environments. Learning Objectives. Context: Software Process (e.g. USDP or RUP)

A technical discussion on modeling with UML 06/11/03 Entity Relationship Modeling with UML

UML Diagram Types. Use Cases do the Following. Use Case Diagram

Part I. Multiple Choice Questions (2 points each):

System Modeling / Class Diagra Diagr m a Week 6

i. Node Y Represented by a block or part. SysML::Block,

Chapter 10 Practical Database Design Methodology and Use of UML Diagrams

Programming Language Constructs as Basis for Software Architectures

Number Representation

Chapter 7D The Java Virtual Machine

Applying 4+1 View Architecture with UML 2. White Paper

IT2305 Database Systems I (Compulsory)

Glossary of Object Oriented Terms

Model Driven Interoperability through Semantic Annotations using SoaML and ODM

CSE 1020 Introduction to Computer Science I A sample nal exam

Object-Oriented Data Modeling

The Entity-Relationship Model

Structural Design Patterns Used in Data Structures Implementation

Habanero Extreme Scale Software Research Project

Programming and Software Development CTAG Alignments

Model Simulation in Rational Software Architect: Business Process Simulation

1. Visual Paradigm for UML

Rose Data Modeler (logical)

Introduction to programming

A UML Introduction Tutorial

Chapter 2. Data Model. Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Chapter 10. Practical Database Design Methodology. The Role of Information Systems in Organizations. Practical Database Design Methodology

Sources: On the Web: Slides will be available on:

The programming language C. sws1 1

Implementation Workflow

Subject knowledge requirements for entry into computer science teacher training. Expert group s recommendations

Transcription:

Graphical Systems Modeling with UML / SysML Class diagrams Piotr Ciskowski

Perspectives - views: architecture class diagram object diagram composite structure diagram package diagram Logical view Use case view Dynamic View behavior sequence diagram activity diagram state machine diagram interaction overview diagram communication diagram timing diagram package diagram system scope & functionality use case diagram package diagram Deployment View Implementation View software component diagram package diagram hardware deployment diagram package diagram

Class diagram best known object oriented modeling / programing static structure diagram presents system s structure graphical representation of static elements of system s domain and relations between them classes generalization, type objects instance, exemplar relations

CLASSES & OBJECTS

Object - class object - each entity (a person, an animal, a being, a notion, a concept, a thing ) that is important in the domain of the system being modeled in the context of the problem being solved structure, statics - atributes, features, fields behavior, dynamics - operations, services, methods - object = instance of a class - object has its identity class - a generalization of objects, - a set of objects with the same features, operations, relations, constraints meaning - an abstract notion (not abstract class!)

Class name: noun symbol: rectangle (with compartments) different levels of detail Client Account Reservation Credit Card - number - type + makereservation() + confirmreservation() + cancelreservation() + verifyclient() - cardnumber : long - holdername : char - type : byte - expirydate : date + authorize() : void + block() : void tool: Enterprise Architect

Class name: noun symbol: rectangle (with compartments) different levels of detail tool: Visual Studio

Class type, kind, set of elements name: noun, capital letter attibutes features, characteristics of objects - static structure - name: small letter operations - actions - services - messages - dynamics, behavior - name: small letter

Class - object class = type, set object = instance, exemplar, identity WashingMachine - brandname : char - model : char - serialnumber : int - load : byte mywashingmachine : WashingMachine brandname = "WM8" load = 10 model = Big Franny serialnumber = 156749 tool: Enterprise Architect

Class stereotypes, responsibilities WashingMachine «market info» - brandname - model «tech info» - load «clothes» + setprogram + wash + dry «maintenance» - selfcleaning # diagnose - measureload WashingMachine «market info» - brandname - model «tech info» - load «clothes» + setprogram + wash + dry «maintenance» - selfcleaning # diagnose - measureload take dirty clothes, clean them, dry them, do not ruin em!!!!

CLASS DIAGRAM ELEMENTS

Class diagram level of complexity conceptual - only key entities analytic - no details - informal names of classes, attributes and operations implementation - «implementation class» - proper names - plus: data types responsibilities visibility scope multiplicities association classes compositions and aggregations generalizations dependencies realizations

Class diagram naming conventions classes: conceptual level: auction trading session żądanie implementation level: Auction tradingsession Zadanie naming conventions attributes: conceptual level: temporary disk free space, adres wysyłki, cell phone no. implementation level: tempdiskfreespace, adreswysylki, PhoneNoCellular naming conventions operations: conceptual level: block SIM card send an SMS implementation level: blocksimcard() sendsms()

Class diagram additional elements: constraints - conditions, limitations of a given element - text, formula, pseudo-code, OCL (Object Constraint Language) - in French brackets WashingMachine - brandname :char - model :char - serialnumber :int - load :byte + setprogram() :void + wash() :void + dry() :void + selfcleaning() :void + diagnose() :void + measureload() :void constraints {load = 8, 9 or 10kg} tools: Enterprise Architect, Visual Paradigm, Visual Studio

Class diagram additional elements: notes - anywhere tool: Visual Studio

Class diagram additional elements: responsibilities - auxiliary - after preliminary scenarios analysis - before full implementation (attributes, operations) WashingMachine responsibilities wash dirty clothes, dry them, do not damage CRC card - responsibilities + collaboration tool: Enterprise Architect

Class diagram additional elements: visibility: + public - private # protected ~ packet - auctionid + title + askingprice + starttime + closingtime ~ deliverytype Auction + addauction() :void + closeauction() :void + modifyauction() :void # getarticledescritpion() :void tools: Visual Studio, Enterprise Architect, Visual Paradigm

Class diagram additional elements: visibility: + public - private # protected ~ packet rule: - attributes + operations: getters & setters

Class diagram additional elements: scope: instance - classifier static attributes and operations

DETAILS

Class diagram data types - depend on modeling tool e.g. Rational Rose.NET logic Boolean Boolean fixed point Byte Byte Integer Short Long Integer Long floating point Single Single Doble Double Decimal character String String Char other Date Date Object Object Currency Variant

Class diagram attributes notation implementation level [< + - ~ # >] [ / ] <name> [ : <type> ] [ [ <multiplicity> ] ] [ = <initial value> ] [ { <property> } ] / - derived attribute - formula usually in attached note properties: ordered, [not] unique, readonly etc. methods notation implementation level [ < + - ~# > ] <name> [ ( <parameter list> ) ] [ : <property> ] parameter list with commas parameters notation implementation level [ in out inout return ] <name> [ : <type> ] [ [ <multiplicity> ] ] [ = <initial value> ] [ { <property> } ]

Class diagram attributes, methods, parameters notation implementation level - premium : Single = 10000 - volume : Double = 1000000 - tick : Percent = 0,01 - tickvalue :Byte = 25 Option + countticks (sellprice:double, buyprice:double) : Single + execute(ticks:single, tickvalue:byte, contracts:integer) : Double tool: Enterprise Architect, example based on: Wrycza et al., Język UML 2.0 w modelowaniu

RELATIONS

Relations types of relations: association generalization dependency realization

Relations ASSOCIATIONS

Relations association - a link between elements - a semantic relation between classes - binary - n-ary extras: - name - roles - navigation - multiplicity - aggregation

Relations association - a link between elements - a semantic relation between classes named - unnamed Project Manager Project is led by Manager Project leads Manager

Relations association - a link between elements - a semantic relation between classes multiplicity 1 - exactly one n - exactly n * - many 0..1 - zero or one 0..* - zero or more 0..n - zero to n 1..n - one to n 1..* - one or more n..m n..* n,m,p,q - between n and m - more than n - n or m or p or q

Relations - examples associations names, directions, multiplicity: Teacher 1 teaches * Student Customer Service 1 serves 1..* Client House 1 has 0,1 Chimney Tricycle 1 has 3 Wheel Egg Container 1 contains 6,12,24 Egg

Relations association - a link between elements - a semantic relation between classes special kinds: multiple recursive qualified

Relations association class precise description of association association itself has some attributes association = class: name attributes operations one association one object of association class

Relations AGGREGATIONS

Relations aggregation - has a - part-whole - binary - contained class container - segment aggregat

Relations composition - owns a - part-whole difference: -object are made of other objects aggreation - weak: components can exist alone - independent composition - strong: destroy the object = destroy components aggregation or attribute simple components - attributes complex components aggregations

Relations CONSTRAINTS

Relations aggregation constraints Meal {or} Soup Salad MainMeal Dessert

Relations GENERALIZATIONS

Relations generalization inheritance class hierarchy superclass subclass parent - child root leaf abstract classes generalization o object of the child class is a kind of an object of the parent class o if not - association

Relations generalization o constraints: {complete} {incomplete} {disjoint} {overlapping}

Relations DEPENDENCIES & REALIZATIONS

Relations dependency o one class depends on the other o changing one class changes in the other independent dependent

Relations dependency o one class depends on the other o changing one class changes in the other independent dependent o object of one class among parameters of other class operation o objects of one class send messages to objects of the other class o objects of one class contain objects of the other class o scale of changes

Relations realization o class interface o interface - a set of operations - services provided by class - a contract o using class - dependency providing class - implementation «realize» o abstract class - class without objects interface - class without implementation

SUGGESTIONS

Class diagram suggestions: do not over draw relate detail - moderate notation big picture details use many diagrams: for different: needs, perspectives, fragments, detail levels not all classes, not all details structure + behavior business - technical