Relationships Relationships between objects and between classes.

Slides:



Advertisements
Similar presentations
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.
Advertisements

UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Object-Oriented Analysis and Design
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML – Class Diagrams.
1 © Wolfgang Pelz UML3 UML 3 Notations describe how to use reusable software. Package Component Deployment Node.
1 CS 426 Senior Projects Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2005] February 12, 2009.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
1 CS 426 Senior Projects Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2002] February 27, 2007.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Data and Process Modeling
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
Package Diagram CS537 Advanced Software Engineering Fall 2010 Prof. J Guo Presented By: Patel Vishrut Patel Harshil Gadhiya Yogesh Dhola Haresh.
Criteria for good design. aim to appreciate the proper and improper uses of inheritance and appreciate the concepts of coupling and cohesion.
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.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
The Design Discipline.
Systems Analysis and Design in a Changing World, Fifth Edition
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Unified Modeling Language, Version 2.0
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part V: Design The Design Workflow Design Classes Refining Analysis Relationships.
Lab 04.
Systems Analysis and Design in a Changing World, 3rd Edition
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
© 2005 Prentice Hall9-1 Stumpf and Teague Object-Oriented Systems Analysis and Design with UML.
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.
Object Oriented Analysis & Design Using UML (CS-512) M-Tech CSE (Ist & 3rd Sem) Part Time Mr. Pawan Luthra Assistant Professor (CSE Deptt.) SBSSTC, Ferozepur.
What is a Structural Model?
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.
2007ACS-3913 Ron McFadyen1 Class Diagram See Schaum’s UML Outline, especially chapters 4, 5, 6, 7.
Slide 1 Systems Analysis and Design With UML 2.0 An Object-Oriented Approach, Second Edition Chapter 2: Introduction to Object-Oriented Systems Analysis.
Part VII: Design Continuous
Design Model Lecture p6 T120B pavasario sem.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
1 Unified Modeling Language, Version 2.0 Chapter 2.
Modeling the Static Structure: Relationships ©SoftMoore ConsultingSlide 1.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
 Description of Inheritance  Base Class Object  Subclass, Subtype, and Substitutability  Forms of Inheritance  Modifiers and Inheritance  The Benefits.
Basic Characteristics of Object-Oriented Systems
Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2005] CS 426 Senior Projects in Computer Science University of Nevada,
11 Systems Analysis and Design in a Changing World, Fifth Edition.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
Modeling with UML – Class Diagrams
Unified Modeling Language (UML)
Roberta Roth, Alan Dennis, and Barbara Haley Wixom
The Movement To Objects
Systems Analysis and Design
Object-Oriented Analysis and Design
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
The Object Oriented Approach to Design
UML Class Diagrams: Basic Concepts
Object Oriented Analysis and Design
CS 426 Senior Projects Chapter 9: Relationships
UML Class Diagram.
Packages.
Class Diagram.
Design Yaodong Bi.
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
Presentation transcript:

Relationships Relationships between objects and between classes

What is a relationship Meaningful connection between elements Objects standing in isolation is useless Connection among objects are called links When objects work together we say that they collaborate Semantic links between classes are called associations Dependencies are catch-all relationships

Links Links between objects allow messages to be passed between them – and objects in response will invoke methods It can be implemented using pointers, references, or by direct inclusion Links can be unidirectional or bidirectional Arrowhead indicates navigability

Object to object link determines a role FirstConstruction (Company object) to Jim (Employee/Manager object) with the role Manage Note that this role can apply to many other objects of type employee Links with similar properties can be combined (diagrammatically) into a path

Association Link is an instantiation of an association Associations can have association name, role name, multiplicity, and navigability Company employs person – employs is an association name Person plays the role of employee and Company has the role name of employer Company can employ multiple persons

Multiplicity needs to be stated and is implied strongly : every person is employed by some company!! If not stated then it is undecided Multiplicity describes business issues and constraints Reflexive associations (?) Association roles contributes to attributes in the class – member, array, or collection

Dependency Client depends on the supplier Usage – client uses the service of supplier to implement its own behavior Abstraction – supplier is more abstract than client Permission – supplier grants/limits permission for access Binding – parameterized templates

Usage Types: As a local parameter in its method As a parameter to a method As a return type Used anywhere in its implemention Instantiate - client an instance of supplier As a conduit between entities

Abstraction dependencies Different levels of abstraction Refine – two elements in same model with refined characteristics Derive – a derived role from other association Trace – similar to refine but in different models Permission dependencies express abilities to access Access – between packages Import – name spaces are merged friend

Inheritance Generalization – with substitutability principle Subclasses inherit – attributes, operations, relationships and constraints Overriding – with exact signature Abstract operations and classes Only Derived classes used to instantiate objects Proper levels of inheritance is suggested

Polymorphism Many forms for the same The exact kind is resolved based on context Gives us the ability to send pertinent messages without knowing the exact nature of the object Helps in transparent collections

Analysis Packages Package is a collection – container and owner of model elements Purpose –Group semantically related things –Define semantic boundary in the model –Provide parallel units for design work –Provide encapsulated name space Contains use-cases, analysis classes, and use- case realizations for a coherent content of the software

Package Package name, visibility of elements Minimize visible and protected elements Package dependencies –Use: client uses a public element in the supplier (default dependency) –Import: name-space merge and potential use of all public elements of supplier –Access: similar to import but name space not merged –Trace: represents historical development from supplier to client.

Access and import relationships are not transitive Packages may be nested inside other packages Two forms of notation Access is like block structure scoping Can have package generalization Package stereotypes –System: representing the entire system –Subsystem: independent part of the system –Façade: view on another package –Framework: package of fundamental system patterns –Stub: package containing proxys Typically a set of intrinsically related packages providing a complete set of services become a component!

Architecture All analysis classes are organized into a set of cohesive packages They are then organized/partitioned into layers Minimize coupling Cohesive cluster of classes and inheritance hierarchies suggest a package 5-10 classes per package

What have we covered Use case modeling and diagrams Objects and Classes and their depiction How to find analysis classes and behavior Relationships – links and association Dependencies and fundamental dependencies Review of inheritance and polymorphism Packages and their relationships