- 1 - © Houman Younessi 2010 MGMT 6170 - Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi.

Slides:



Advertisements
Similar presentations
Object-oriented modeling Class/Object Diagrams
Advertisements

Stereotypes Stereotypes provide the capability to create a new kind of modeling element. –They can be used to classify or mark modeling elements. –A type.
Analysis Modeling Static Modeling.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
UML Class Diagram and Packages
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
- 1 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi.
What is UML? A modeling language standardized by the OMG (Object Management Group), and widely used in OO analysis and design A modeling language is a.
Class Diagram & Object Diagram
Lecture 10 ISM - © 2010 Houman Younessi Convener: Houman Younessi Information Systems Spring 2011.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
7M822 UML Class Diagrams advanced concepts 14 October 2010.
UML a crash course Alex Lo Brian Kiefer. Overview Classes Class Relationships Interfaces Objects States Worksheet.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Unified Modeling Language
Object-Oriented Analysis and Design
UML for Java Programmers Object Mentor, Inc. Copyright  by Object Mentor, Inc All Rights Reserved
Class Diagram.
Lawrence ChungCS6359.0T1: Module 41 Module 4: Relationships.
ECSE Software Engineering HO 4 © HY 2012 Lecture 4 System Modeling In SE, we have an array of notations and diagrams for modeling in each.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Lab 04.
Distributed Java Programming Distributed Java Programming Class #2 August 22, 2002.
Class Diagram. A class diagram describes the classes and the association (static relationship) between these classes ( 描述系統中物件 的 type(class) ,以及這些 class.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 02. Objects,
Unit 1 INTRODUCTION TO MODELING AND CLASS MODEL Ref : L7-UML.PDF.
Activity & Class Modeling Labs Discussion p3 T120B pavasario sem.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
1 Class Diagrams: Advanced Concepts. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are the most commonly used diagrams.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
UML Class Diagrams 1 These lecture slides are copyright (C) Marty Stepp, They may not be rehosted, sold, or modified without expressed permission.
An Introduction to the Unified Modeling Language
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Lecture 1: UML Class Diagram September 12, UML Class Diagrams2 What is a Class Diagram? A class diagram describes the types of objects in the system.
Design Jon Walker. More UML ● What is UML again?
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Design Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis and Design Class and Object Diagrams.
Chapter 3 Class Diagrams. 2 Outline Class Basics Class Basics Classes Classes Association Association Multiplicity Multiplicity Inheritance Inheritance.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
UML Part 1: Class Diagrams. Introduction UML stands for Unified Modeling Language. It represents a unification of the concepts and notations presented.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Chapter 16 UML Class Diagrams.
Chapter 3: Introducing the UML
Class Diagram Lecture # 1. Class diagram A Class Diagram is a diagram describing the structure of a system shows the system's classes Attributes operations.
Activity & Class Modeling Labs Discussion p3 T120B pavasario sem.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
COP 3330 Notes 4/13. Today’s Topics UML Class Diagrams.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Modeling with UML – Class Diagrams
UML Diagrams: Class Diagrams The Static Analysis Model
UML-Class Diagrams. UML-Class Diagrams Order placement problem A Company has two types of customers, corporate customers and personal customers. All.
A Review or Brief Introduction
UML Class Diagrams (more notation)
Chapter 16 UML Class Diagrams.
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
UML Unified Modelling Language
Introduction to UML Introduction to UML Shiyuan Jin September,23,2002
Object Oriented Analysis and Design
UML Class Diagram.
Class Diagrams Class diagram is basically a graphical representation of the static view of the system and represents different aspects of the application.
Object Oriented System Design Class Diagrams
Unified Modeling Language (UML)
Presentation transcript:

- 1 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi Lecture 5

- 2 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design UML has a an array of notations and diagrams for modeling in each of these three views. Structure Modeling Class notation, object notation, Associations, Links, Class diagrams, object diagrams,… Transformational Modeling Actors, Transformational relations, Use Case diagrams, Context Diagrams, Activity diagrams,Transformational definitions, …

- 3 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Causal (Dynamic) Modeling Events, Activities, Actions, Transitions, States, Sequence diagrams, Collaboration diagrams, Statechart diagrams, etc.… In the next session we shall start with structural modeling and introduce some important elements of the UML notation set.

- 4 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Structural Modeling: Answers the question WHAT? We need to concentrate on static relationships between objects (SNAPSHOT). So, we need to depict: ObjectsClasses Links Associations Class Diagram

- 5 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design CLASSES The implementation of a type A generator for instances A class is depicted as a solid-outlined rectangle with compartments: Must have a name compartment May have other compartments (up to 3 more)

- 6 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design The other compartments may contain: Compartment 2: Attributes Compartment 3: Operations Compartment 4: Others (Business rules, exceptions, etc.) Name Compartment Attributes Compartment Operations Compartment Other Compartment Widget color: Color position:Coord=(0,0) move(from:Coord,to:Coord=(50,50)) get_color( ):Color draw( ) draw_all( ) color /= “white”

- 7 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Class name and the class name compartment: The name compartment must be present The name compartment contains the name of the class. Class names are centered, begin with a capital letter and are in boldface. Abstract class names are italicized.

- 8 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Attributes and the attribute compartment: May be omitted when drawing high level diagrams Are denoted as left justified plain lowercase text strings The name may be followed by a colon ( : ) followed by the type of the attribute Optionally we can set the initial value of the attribute. To do so, the type name is followed by ( = ) and then the value

- 9 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design May contain a visibility tag. A visibility tag could be: +Public # Protected -Private

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Operations and the operations compartment: May be omitted when drawing high level diagrams Are denoted as left justified plain lowercase text strings. Abstract operations are italicized May have parentheses containing a comma separated list of the parameters of the method that implements the operation. Optionally the parameter list may have indicators. These are:

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design inParameter is only passed in to the operation outParameter is only passed out (returned) inoutBoth (Default is “in”) May have a return list containing one or a comma separated list of more than one formal parameters following a colon after the parameter list. Multiple return parameters, if there, must have a name and a type separated by a colon.

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design An operation may have a class scope. Class operations are underlined. May contain a visibility tag. A visibility tag could be: +Public # Protected -Private

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Attribute - color:Color=red Operation: # credit_rating(in candidate:Customer=current, in agency: Agent=dandb) : rating : Integer, reason : Text Usually we do not bother with this level of detail unless we aim to generate code automatically

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design TEMPLATES AND GENERIC CLASSES PAIR T1,T2 first:T1 second:T2 set_first(in T1) set_second(in T2) out( ): STRING Pair > (Integer,Integer) OR

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design OBJECTS An element of a type set. An instance of a class. An object is depicted as a solid-outline rectangle with up to 3 compartments: The top compartment is the name compartment. May have other compartments (up to 2 more)

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design The other compartments may contain: Compartment 2: Attribute values Compartment 3: Other Name Compartment Attributes Compartment Other Compartment doowak: Widget color=Red position=(10,45)

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Object name and the name compartment: The name compartment must be present The name compartment contains the name of the object; if a name exists. The name structure, if there, must be underlined. If the name is not there, or for “un-named” objects, the colon must remain. The name may be followed by a colon ( : ) followed by a comma separated list of class to which the object belongs.

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design :Widget color=Red position=(10,45) An un-known or un-named object : An object, any object

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Attribute values and the attribute values compartment: It is optional and may not be present. If present, it contains the names of the relevant attributes of the class of which this object is an instance and the values relating to that attribute. Only attribute names and values of interest should be shown.

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design RELATIONSHIPS There are three basic types of relationship between classes. These are: Inheritance Aggregation Association

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design INHERITANCE Parent Child 2Child 1 Discriminator …...

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Person FemaleMale gender Example:

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design AGGREGATION Two types in UML: Weak aggregation Composition Brain Person Department Professor Composition Weak aggregation

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design ASSOCIATIONS Association shows a named relationship between instances of a class and other instances of itself or between instances of two or more other classes. Class A Class B Role A:Class Role B:Class Name of Association Multiplicity

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Each association has two roles, each role is a direction on the association. These roles can be explicitly named on the association with a label. If not explicitly labeled, then the role name is the same as the target class and may be omitted. Order Person customer Is placed by

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design ABABABAB 1 1..* 0..1 * An A is always associated with exactly one B An A is always associated with one or more B An A is always associated with zero or one B An A is always associated with zero or more B AB n An A is always associated with exactly n B n..m An A is always associated with n to m B Where n is any integer number greater than 1 Where n,m are integer numbers and m>n AB

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design An association may have direction. When it does, the direction is shown with an arrow. AB In the above diagram, A, is called the source and B is the target. A bi-directional arrow indicates navigability in both directions. AB

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design An association with a “many” side may be ordered. Ordering is shown as a label on the target class. Screen Window * {ordered} Visible on

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design An association may be higher than binary. A Ternary Association Name Class A Class B Class C

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design reservation Person Flight Seat Example:

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Association Attributes Person Accesses File * * permission Association Attribute

© Houman Younessi 2010 MGMT Advanced Systems Analysis and Design Employee sales rep 0..1* Corporate Customer Personal Customer Product contactName creditRating remind() bill(Real) creditCard# Customer name address rating():Integer 1 {if Order.customer.rating = 5 then Order.isPrepaid := True} * line item Order 1 * dateReceived: Date isPrepaid:Boolean number:String price:Money dispatch() close(Real) quantity:Integer price:Money isFilled: Boolean creditRating() >=4 Courtesy: Martin Fowler, with some changes by Houman Younessi Order Line