Class and Sequence diagrams UML notation SE-2030 Dr. Mark L. Hornick 1.

Slides:



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

SE-1020 Dr. Mark L. Hornick 1 Inheritance and Polymorphism: Interfaces.
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.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
1 CS 426 Senior Projects Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2005] February 12, 2009.
1 CS 426 Senior Projects Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2002] February 27, 2007.
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.
7M701 1 Class Diagram advanced concepts. 7M701 2 Characteristics of Object Oriented Design (OOD) objectData and operations (functions) are combined 
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Page 1 R Copyright © 1997 by Rational Software Corporation Analysis and Design with UML.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
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 Unified Modeling Language (UML) Class Diagrams.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
State Machines State diagrams SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
UML Unified Modeling Language. What is UML? Unified Modeling Language (UML) is a standardized, general-purpose modeling language in the field of software.
Page 1 What is the UML? UML stands for Unified Modeling Language The UML combines the best of the best from – Data Modeling concepts (Entity Relationship.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
Detailed design – class design Domain Modeling SE-2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
Page 1  Copyright © 1997 by Rational Software Corporation Computer System Business Process Order Item Ship via “ Modeling captures essential parts of.
UML Review – class diagrams SE 2030 Dr. Rob Hasker 1 Based on slides written by Dr. Mark L. Hornick Used with permission.
1 UML Basic Training. UML Basic training2 Agenda  Definitions: requirements, design  Basics of Unified Modeling Language 1.4  SysML.
Lab 04.
Distributed Java Programming Distributed Java Programming Class #2 August 22, 2002.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
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 Diagrams: The Static Model Class Diagrams. The Static Model Define the static structure of the logical model Represent classes, class hierarchies.
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.
SE-1020 Dr. Mark L. Hornick 1 Composition, Aggregation, and Inheritance - Introduction.
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.
SE-1010 Dr. Mark L. Hornick 1 Java Programming Basics.
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.
Page 1 R Copyright © 1997 by Rational Software Corporation Analysis and Design with UML Presentation was downloaded (and is available for free) from Rational.
Use Case Textual Analysis
UML / UML 2.0 Diagrams (Part I) 1. Overview of the 13 diagrams of UML Structure diagrams 1.Class diagram 2.Composite structure diagram (*) 3.Component.
UML Class Diagram. A class diagram shows 1.Classes 2.The relationships between them.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
UML Part 1: Class Diagrams. Introduction UML stands for Unified Modeling Language. It represents a unification of the concepts and notations presented.
Class diagrams Terézia Mézešová.
Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich, Jeffrey A.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
Kyung Hee University Class Diagramming Notation OOSD 담당조교 석사과정 이정환.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
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)
Lecture 5 Introduction to Use Case Analysis and the Analysis Model Introduction to the UML.
What is this? SE-2030 Dr. Mark L. Hornick 1. Same images with different levels of detail SE-2030 Dr. Mark L. Hornick 2.
1 Kyung Hee University Interaction Diagrams Spring 2001.
Chapter 9: Relationships Chapter 10: Inheritance and Polymorphism [Arlow and Neustadt, 2005] CS 426 Senior Projects in Computer Science University of Nevada,
UML Review – class diagrams SE-2030 Dr. Mark L. Hornick 1.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
UML Diagrams: Class Diagrams The Static Analysis Model
Object-oriented and Structured System Models
UML Diagrams: The Static Model Class Diagrams
Object Oriented Analysis and Design
CS 426 Senior Projects Chapter 9: Relationships
Advanced State Chart diagrams
IMAT5205 Systems Analysis and Design
UML Class Diagram.
Understand and Use Object Oriented Methods
Software Analysis.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Object Oriented System Design Class Diagrams
Presentation transcript:

Class and Sequence diagrams UML notation SE-2030 Dr. Mark L. Hornick 1

Domain modeling will identify multiple classes Taken together, a class diagram gives a good overview of a system’s structure Including how the various classes are related to one another SE-2030 Dr. Mark L. Hornick 2

Identifying class relationships Go back to the Use Cases, and look for possessive terms relating one object to another “account’s credentials” “order’s entries” “path’s coordinates” SE-2030 Dr. Mark L. Hornick 3 Possessive terms usually indicate a stronger form of relationship than a simple association

Many classes within an application usually exhibit some type of Association between one another Associations represent permanent relationships between instances of classes: An Order has Entries An Order is billed to an Account A Login Screen is a type of Dialog An Invoice corresponds to each Order SE-2030 Dr. Mark L. Hornick 4

A Simple Association merely shows a general-purpose relationship SE-2030 Dr. Mark L. Hornick 5 The single-line connector doesn’t indicate anything specific – that is, it’s an unspecified association. About all we can say is that objects of these classes are somehow interrelated – perhaps an Invoice somehow holds a reference to an Order object (or vice versa).

An association can indicate multiplicity – that is, how many objects of one class correspond to objects of the other SE-2030 Dr. Mark L. Hornick 6 This association indicates that there is a one-to-one correspondence between Invoice instances and Order instances; that is, for every Invoice object, there is a corresponding Order object, and vice versa.

Associations can indicate various degrees of multiplicity SE-2030 Dr. Mark L. Hornick 7 This Simple Association indicates that for every Order object, there is at least one corresponding Entry object. Here, any number (including zero) of Entry objects correspond to each Order object

Associations can indicate navigability – that is, whether an object holds a reference to the other SE-2030 Dr. Mark L. Hornick 8 This one-way association indicates that an Invoice object holds a reference to a single Order object. This bi-directional association indicates that Invoice and Order objects hold references to each other.

End Roles indicate that an association is maintained via a specific attribute defined within a class SE-2030 Dr. Mark L. Hornick 9 This one-to-one, one-way association with End Role acct indicates that an Order object holds a reference to a single Account object via a private Account attribute named acct. Here is a less illustrative way of showing the same relationship.

End Roles can indicate specific bi-directional references SE-2030 Dr. Mark L. Hornick 10 This bi-directional association indicates that an Order object holds a reference to a single Account object via a private Account attribute named acct, and that an Account object holds a reference to a single Order object via a private Order attribute named ord. Here is a less illustrative way of showing the same relationship.

Associations can imply that a reference is a collection of objects SE-2030 Dr. Mark L. Hornick 11 This one-way association indicates that an Order object holds a reference to a collection of zero or more Entry objects via a private attribute named items. The same association, less illustratively.

Stereotypes indicate a logical function of an association SE-2030 Dr. Mark L. Hornick 12 This stereotype specifies “containment” of an collection of Entry objects by an Order object. Stereotypes are usually verbs that indicate the specific type of usage.

Composition is a stronger form of an association that implies containment and lifetime SE-2030 Dr. Mark L. Hornick 13 By “stronger”, we mean that the semantics of the association are more specific. Composition indicates that the Entry objects cannot exist independently of the Order object; that is, if the Order object is deleted, all the Entries are deleted as well.

Aggregation is a stronger form of an association that implies containment, but not lifetime SE-2030 Dr. Mark L. Hornick 14 Aggregation indicates that the Order object can exist independently of the Invoice object; that is, if the Invoice object is deleted, the Order can still exist (maybe it can be fulfilled free of charge). However, the Composition association in the other direction indicates that if an Order is deleted, the associated Invoice must be deleted as well (you shouldn’t invoice someone for an Order that doesn’t exist!)

Inconsistent terminology between strict UML and EA UML Aggregation A is composed of B; B can exist without A EA refers to this as Shared Aggregation UML Composition A is composed of B; B cannot exist without A EA refers to this as Composite Aggregation SE-2030 Dr. Mark L. Hornick 15

Generalization is another form of association that implies that a class inherits behavior defined and implemented in another class SE-2030 Dr. Mark L. Hornick 16 Here, the Generalization association implies that the LoginClass inherits the behavior (and attributes) of the JFrame class. Objects of the LoginClass are also JFrame objects. Generalization can be illustrated in the alternate notation shown if the parent class is not present in the class diagram

Realization is a form of association that implies that a class implements, but does not inherit, the behavior defined in another class SE-2030 Dr. Mark L. Hornick 17 Here, the Realization association implies that the LoginClass implements the behavior of the Serializable class (which in Java is called an Interface). Objects of the LoginScreen class are also Serializable objects.

In EA, the Association Properties dialog controls the semantics of an association SE-2030 Dr. Mark L. Hornick 18

Showing recursion in a Sequence Diagram SE-2030 Dr. Mark L. Hornick 19

Showing selection in a Sequence Diagram SE-2030 Dr. Mark L. Hornick 20