Session 11 The Class Diagram: Aggregation and Generalization Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented.

Slides:



Advertisements
Similar presentations
Session 18 Modeling the Dynamic View: The Collaboration Diagram Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 20, 2011 Presented.
Advertisements

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.
UMLにおける実体指向. Object-oriented concepts have been around since the 1970s. A variety of programming languages, including C++, Smalltalk, Java, and Eiffel,
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Slide 1 Systems Analysis & Design CS183 Spring Semester 2008 Dr. Jonathan Y. Clark Course Website:
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
System Concepts and Architecture Rose-Hulman Institute of Technology Curt Clifton.
December 4, 2002 Data Modeling – James Cohen Enhanced Entity Relationship (EER) Model Presented by James Cohen.
Chapter 4 The Enhanced Entity-Relationship (EER) Model
UML and Object Oriented Concepts
Chapter 41 Enhanced Entity-Relationship and Object Modeling.
Entity-Relationship modeling Transparencies
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Session 24 Modeling the Development Environment Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 27, 2011 Presented by Hyewon Lim.
Session 12 Applying the Class Diagram to the Case Study Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented by Hyewon.
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
Session 26 Modeling the Static View: The Deployment Diagram Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 27, 2011 Presented.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
© 2011 Pearson Education 1 Chapter 13 (Online): Object-Oriented Databases Modern Database Management 10 th Edition, International Edition Jeffrey A. Hoffer,
7-1 © Prentice Hall, 2004 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
7-1 © Prentice Hall, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Unit 3 Conceptual Data Modeling. Key Concepts Conceptual data modeling process Classes and objects Attributes Identifiers, candidate keys, and primary.
7-1 © Prentice Hall, 2007 Week 5: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
Domain Model Refinement Larman, chapter 31 CSE 432: Object-Oriented Software Engineering Glenn D. Blank, Lehigh University.
CSC271 Database Systems Lecture # 25. Summary: Previous Lecture  Structural constraints  Multiplicity  Cardinality  Participation  Connection traps.
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.
E.Bertino, L.Matino Object-Oriented Database Systems 1 Chapter 5. Evolution Seoul National University Department of Computer Engineering OOPSLA Lab.
ITEC 3220A Using and Designing Database Systems Instructor: Prof Z. Yang Course Website: 3220a.htm
Relationships Relationships between objects and between classes.
ITEC 3220A Using and Designing Database Systems Instructor: Gordon Turpin Course Website: Office: CSEB3020.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Object Oriented Analysis and Design Class and Object Diagrams.
 Week08.  Review Schedule Weeks 8-14  This week o Review last class o Introduce Class Diagrams o ICE-03 Sheridan SYST Engineering Quality Systems.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Chapter 12 Object-oriented design for more than one class.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Class diagrams Terézia Mézešová.
 Class diagrams show the classes of the system, their interrelationships (including inheritance, aggregation, and association), and the operations and.
© Shamkant B. Navathe CC Enhanced Entity-Relationship Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Object Modeling THETOPPERSWAY.COM. Object Modelling Technique(OMT)  Building a model of an application domain and then adding implementation.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
Basic ER modeling was adequate for simpler databases, but in the 1980’s more demanding databases required more extensive modeling requirements. Some such.
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.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
Enhanced Entity-Relationship (EER) Model
Conceptual Design & ERD Modelling
The Movement To Objects
The Enhanced Entity- Relationship (EER) Model
Session 2 Welcome: The sixth learning sequence
OBJECT ORIENTED CONCEPT
EKT472: Object Oriented Programming
Chapter 11 Object-Oriented Design
Entity-Relationship Model
Class diagram Description
Outline of the ER Model By S.Saha
Engineering Quality Software
UML Class Diagram.
Understand and Use Object Oriented Methods
ITEC 3220A Using and Designing Database Systems
Object Oriented Analysis and Design
Object Oriented System Design Class Diagrams
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
From Class Diagram to Contract Diagram
Presentation transcript:

Session 11 The Class Diagram: Aggregation and Generalization Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented by Hyewon Lim

Contents  Modeling Aggregation and Composition  Modeling Generalization 2

Modeling Aggregation and Composition (1/6)  Every aggregation relationship is a type of association –All the properties of an association relationship + some rules of its own  Every composition relationship is a form of aggregation –All the properties of an aggregation + some rules of its own 3

Modeling Aggregation and Composition (2/6)  Aggregation –A special type of association –Used to indicate that the participating objects are not just independent objects that know about each other –They are assembled or configured together to create a new, more complex object  Model aggregation on a Class diagram 4

Modeling Aggregation and Composition (3/6)  Aggregation describes a group of objects in a way that changes how you interact with them  The concept is aimed at protecting the integrity of a configuration of objects in two specific ways –Aggregation defines a single point of control in the object that represents the assembly –When an instruction is given that might effect the entire collection of objects, the control object dictates how the members will respond 5

Modeling Aggregation and Composition (4/6)  Composition –Used for aggregations where the life span of the part depends on the life span of the aggregate –The aggregate has control over the creation and destruction of the part  The member object cannot exist apart from the aggregation 6

Modeling Aggregation and Composition (5/6)  Creating aggregation and composition relationships 7 Our company maintains a group of race cars. Our cars use some of our new 8-cylinder engines and new transmissions. Once the engines are assembled, the pistons, carburetor, and plugs cannot be swapped between engines due to changes caused by the high temperatures. We want to keep records of the performance achieved by each engine in each car and each transmission in combination with each engine. Our drivers evaluate each car to give us their assessment of the handling. We need a system to track the configurations and the drivers’ assessments.

Modeling Aggregation and Composition (6/6)  Creating aggregation and composition relationships 8

Contents  Modeling Aggregation and Composition  Modeling Generalization 9

Modeling Generalization (1/11)  Generalization –The process of organizing the properties of a set of objects that share the same purpose –Use this process routinely to organize large amounts of information –“kind of” or “type of” 10

Modeling Generalization (2/11)  Generalization and inheritance 11 Inherits all the properties of fruit Specialization: Adds some unique properties that only apply to applies Generalization

Modeling Generalization (3/11)  A generalization is not an association –Association define the rules for how objects may relate to one another –Generalization relates classes together where each class contains a subset of the elements needed to define a type of object –No need for multiplicity, roles, and constraints 12

Modeling Generalization (4/11)  Protected visibility –Allows only objects of the same class or subclasses to see the element 13

Modeling Generalization (5/11)  To draw a generalization relationship –Superclass  Contains the traits that are common to every object in the set –Subclass  Contains a unique set of properties for only certain objects within the set  A class my be both a superclass and a subclass –Abstract class  A class that cannot create objects (cannot be instantiated)  Abstract –Any superclass that defines at least one operation that does not have a method  Only a superclass can be abstract 14

Modeling Generalization (6/11)  To draw a generalization relationship –Concrete class  A class that has a method for every operation, so it can create objects  The methods may be defined in the class or inherited from a superclass  All classes at the bottom of a generalization hierarchy must be concrete  Any superclass may be concrete –Discriminator  An attribute or rule that describes how I choose to identify the set of subclasses for a superclass  The discriminator I choose depends on the problem I am trying to solve 15

Modeling Generalization (7/11) 16 Superclass Subclass Concrete class

Modeling Generalization (8/11)  Two ways to draw a generalization –In either form, draw a triangle at the superclass end of the generalization line (pointing to the superclass)  How to model generalization –Specialization (the most general class → the most specialized classes) –Generalization (the most specialized classes → the most generalized class) 17

Modeling Generalization (9/11)  Example: specialization –Step 1: Draw the starting superclass –Step 2: Identify the discriminator (“breed”) for the first level of differentiation or specilazation, then create a class for each value 18

Modeling Generalization (10/11)  Example: specialization –Step 3: Connect all the Breed subclasses to the Dog superclass using the generalization relationship & place the discriminator label on the line 19

Modeling Generalization (11/11)  Example: specialization –Step 4: The process continues by repeating the steps for each new subclass I create 20

The End