Chapter 16 UML Class Diagrams.

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

© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Architectural Modeling Notations.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
Inheritance. Extending Classes It’s possible to create a class by using another as a starting point  i.e. Start with the original class then add methods,
Chapter 16. Fig Fig Note: If Sale references nothing then the only thing it is associated with is what references it Note: association name.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 th Ed Chapter Chapter 4 Defining Your Own Classes.
Design Patterns in Java Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Chapter 15 Interaction Diagrams. Most Common Sequence Diagram Communication Diagram Sequence Diagrams illustrate interactions between classes of a program.
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 
- 1 - © Houman Younessi 2010 MGMT Advanced Systems Analysis and Design A dvanced S ystems A nalysis and D esign Fall 2010 Convener: Houman Younessi.
Designing with Interaction and Design Class Diagrams Chapters 15 & 16 Applying UML and Patterns Craig Larman With some ideas from students in George Blank’s.
Domain Modeling Chandan R. Rupakheti and Steve Chenoweth Week 5, Day 1.
The Unified Modeling Language (UML) Class Diagrams.
Object-Oriented Analysis and Design
CSSE 374: Design Class Diagrams Steve Chenoweth Office: Moench Room F220 Phone: (812) These slides and others.
Object-Oriented Design. From Analysis to Design Analysis Artifacts –Essential use cases What are the problem domain processes? –Conceptual Model What.
Chapter 9 Domain Models. Domain Model in UML Class Diagram Notation A “visual dictionary”
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
DOMAIN MODEL— PART 2: ATTRIBUTES SYS466. Looking For Potential Classes “Know the business”. Ask Questions Identify business concepts; filter nouns (person,
Software Engineering 1 Object-oriented Analysis and Design Applying UML and Patterns An Introduction to Object-oriented Analysis and Design and Iterative.
An Introduction to Java Chapter 11 Object-Oriented Application Development: Part I.
DOMAIN MODE: ASSOCIATIONS, MULTIPLICITY AND ATTRIBUTE-TEXT NOTATION SYS466.
UML Class Diagrams and Caché CAMTA Meeting – 1 st December 2011 John Murray Senior Product Engineer.
Object-Oriented Analysis and Design Feb 25, 2009.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Design Class Diagrams (DCDs)
Chapter 16 Applying UML and Patterns Craig Larman
Domain Model—Part 3: Associations, Multiplicity and Attribute- Text Notation.
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.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Advanced UML Class Diagrams.
NJIT UML Class Diagrams Chapter 16 Applying UML and Patterns Craig Larman.
1 Introduction to Classes and Objects Chapter 3 Introduction to Classes and Objects Chapter 3.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
Object-Oriented Analysis and Design Feb 11, 2009.
Appendix D UML at a Glance Summary prepared by Kirk Scott 1.
Chapter 10 Defining Classes. The Internal Structure of Classes and Objects Object – collection of data and operations, in which the data can be accessed.
Design Model Lecture p6 T120B pavasario sem.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Domain Model—Part 2: Attributes.  A logical data value of an object  (Text, p. 158)  In a domain model, attributes and their data types should be simple,
Object Oriented Analysis and Design Class and Object Diagrams.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Chapter 3 Class Diagrams. 2 Outline Class Basics Class Basics Classes Classes Association Association Multiplicity Multiplicity Inheritance Inheritance.
Chapter 16: UML Class Diagrams
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
INFO 620Lecture #71 Information Systems Analysis and Design Design Class Diagrams and others INFO 620 Glenn Booker.
Domain Model A representation of real-world conceptual classes in a problem domain. The core of object-oriented analysis They are NOT software objects.
BTS430 Systems Analysis and Design using UML Domain Model—Part 2: Associations and Attributes.
Identifying classes, Packages and drawing class Diagrams, Object Diagrams and composite structure diagrams Week 07 1.
Sub-Phase Low Level Design (cont)
TK2023 Object-Oriented Software Engineering CHAPTER 11 CLASS DIAGRAMS.
BTS430 Systems Analysis and Design using UML Design Class Diagrams (ref=chapter 16 of Applying UML and Patterns)
Class Diagrams Revisited. Parameterized Classes Parameterized Classes - are used to represent relationships between templates.
DOMAIN MODEL—PART 2: ATTRIBUTES BTS430 Systems Analysis and Design using UML.
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2006 Classes and Objects Patrick Bailey Keith Vander Linden Calvin College.
Chapter 9 Domain Models.
UML Class Diagrams (more notation)
Design Class Diagrams
Chapter 16 UML Class Diagrams.
Design Class Diagrams
Object Oriented Analysis and Design
Slides by Steve Armstrong LeTourneau University Longview, TX
Chapter 16 Class Diagrams.
Chapter 16 UML Class Diagrams
Object Oriented System Design Class Diagrams
Information System Design
The generalization of class
Design Model: Creating Design Class Diagrams
Presentation transcript:

Chapter 16 UML Class Diagrams

Domain Model vs. Design Class Diagram (DCD)

Attribute text vs. association lines

Full format attribute text notation visibility name : type multiplicity = default {property string}

UML Class Diagram Conventions: Domain Models vs. DCDs Arrows: Used in DCDs. Register has currentSale attribute Not used in domain models. DCDs have multiplicities only at target end No role name for DCDs No association name for DCDs

Attribute text vs. association lines Guideline: Attributes should be (simple, primitive) data types Boolean, Date, Number (Integer, Real), String (Text), Time, Phone Number, ID Number, Postal Code, … Non-data type relationships (i.e., class relationships) should be expressed using associations, not attributes. Notational difference only. As far as coding is concerned, they mean the same thing.

Notation at Association Ends Rolename: Association end name Multiplicity Property string

Collection Attributes

Note Symbols: Notes, Comments, Constraints and Method Bodies

Operations (Methods) Full official format visibility name (parameter-list) : return-type {property-string} Can use programming language notation if more convenient and understandable Operations assumed public unless indicated otherwise Property string: Arbitrary info Example: Exceptions that may be raised Operation vs. method Operation: A declaration, the specification of a method Method: Implementation of an operation Access operations (set & get methods) usually excluded from DCD diagrams

<<actor>> <<interface>> {abstract} {ordered} UML Keywords <<actor>> <<interface>> {abstract} {ordered}

Generalization, Abstract Classes, Abstract Operations final class shown by {leaf}

Dependency Reserve its use for purposes other than associations/attributes Examples: Global, parameter variable, local variable and static method dependencies public class Sale { public void updatePriceFor(ProductDescription description) { Money basePrice = description.getPrice(); }

Dependency Example public class Foo { public void doX() { System.runFinalization(); // ... }

Dependency Labels

Interface Notations

Composition Composition: A strong kind of association An instance of Square (“the part”) belongs to only one Board (“the composite instance) at a given time A Square object must always belong to a Board No free-floating parts The Board (composite) is responsible for creating and deleting the parts If composite is destroyed, the parts must also be destroyed or attached to another composite.

Constraints Notation

Qualified Associations Qualifier: Selects an object from a larger set of related objects Based on the qualifier key Suggests looking things up by key e.g. in a hashtable Multiplicity on the association is changed from many to one.

Association Classes The association itself is a class Why: A lot of information needs to be remembered/stored about the association attributes operations

Singleton Classes

Template Classes and Interfaces public class Board { private List<Square> squares = new ArrayList<Square>(); // ... }

User-Defined Compartments

Active Classes Active object: Runs on and controls its own thread of execution

Interaction diagrams help build and debug class Diagrams