EKT472: Object Oriented Programming

Slides:



Advertisements
Similar presentations
UML an overview.
Advertisements

UML (cont.) “The Unified Modeling Language User Guide” by G. Booch, J. Rumbaugh and I. Jacobson ● Classes ● Relationships ● Class diagrams ● Examples.
214 CONCEPTUAL DESIGN: UML CLASS DIAGRAM RELATIONSHIPS.
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.
CS 340 UML Class Diagrams. A model is an abstraction of a system, specifying the modeled system from a certain viewpoint and at a certain level of abstraction.
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.
Class Diagram & Object Diagram
IMSE 11 - UML Class Diagrams
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.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Lawrence ChungCS6359.0T1: Module 41 Module 4: Relationships.
Chapter 6: ER – Entity Relationship Diagram
Session 11 The Class Diagram: Aggregation and Generalization Written by Thomas A. Pender Published by Wiley Publishing, Inc. October 12, 2011 Presented.
1 Java Inheritance. 2 Inheritance On the surface, inheritance is a code re-use issue. –we can extend code that is already written in a manageable manner.
Object-Oriented Software Development F Software Development Process F Analyze Relationships Among Objects F Class Development F Class Design Guidelines.
UML-1 2. Object Model UML-2 Benefits Of OO Development Models System using Objects Small Semantic gap between reality & model Understanding the system.
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.
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.
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 Model Lecture p6 T120B pavasario sem.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Database Design – Lecture 12 Object Oriented Database Design cont’d.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
1 CSC241: Object Oriented Programming Lecture No 17.
CLASS DIAGRAMS A classy approach to objects. The Basic Class Diagram  Class Name  Attributes (- indicates private each would have properties or accessor/mutator.
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.
 Class and Diagram  Representation of Class Name Attributes Operations  Visibility of Attributes and Operations.
Enhanced Entity-Relationship (EER) Model
Unified Modeling Language (UML)
Object-Oriented Modeling
Structural Modeling.
Enhanced Entity-Relationship and Object Modeling Objectives
Business System Development
Session 2 Welcome: The sixth learning sequence
OBJECT ORIENTED CONCEPT
Class diagram Description
UML Class Diagrams: Basic Concepts
Chapter 18: Refining Analysis Relationships
Domain Class Diagram Chapter 4 Part 2 pp
Lec 3: Object-Oriented Data Modeling
2018, Fall Pusan National University Ki-Joune Li
UML Class Diagram.
Software Engineering Lecture 10.
Software Architectures
Software Engineering System Modeling Extra examples Dr.Doaa Sami
Understand and Use Object Oriented Methods
Chapter 2 Underpinnings of Requirements Analysis
2. Review of OO Paradigm and UML
Enterprise & Application Frameworks
Enhanced Entity-Relationship (EER) Modeling
Object Oriented System Design Class Diagrams
Information System Design
Enhanced Entity-Relationship (EER) Modeling
Cheng (Sp2001): Object-Oriented Development Overview
2019, Fall Pusan National University Ki-Joune Li
Presentation transcript:

EKT472: Object Oriented Programming Class Relationship

Example of Class

Associations and Links Link is physical or conceptual connection between objects Link is an instance of an Association Example: Link : Susan is-wife-of Robert Julie is-wife-of John Association: Woman is-wife-of Man Associations and Links appear as Verbs

Associations & Links... may be implemented as unidirectional Associations are bi-directional may be implemented as unidirectional Implemented usually as pointers important not to think as pointers Associations may be one-to-one one-to-many many-to-one many-to-many

Associations Notations

Link Attributes & Association Classes Attributes that belong to association of object rather than one object Link Attributes belong in Association Classes Ex: Salary received by Employee from Company In an one-to-one association you may try to make it attribute of one of the objects Leads to extensibility problems

Association Class Notation Person Company * * Employment salary:double

Role Names Helps to navigate from one object to related objects Name given to either end of an association Helps to navigate from one object to related objects wife husband Woman Man 0..1 married 0..1 Helps clarify when two classes have several associations between them wife husband Man Woman 0..1 married 0..1 1 * daughter children father

Aggregation & Composition Part-of or part-whole relationship (by reference) Example : Car has Engine and Transmission Assembly of objects with aggregate and component parts Component existence may or may not depend on aggregate

Aggregation & Composition... Part belongs to only one whole (by Value) Part lives and dies with the whole Whole cannot replace the part

Aggregation vs Composition Example Person brain Composition Aggregation Car

Aggregation Vs. Association Special form of Association Confusing Aggregation represents “part-of” relationship Some operations on whole automatically applied to its parts Aggregate is asymmetric : part is subordinate to the whole Association is symmetric : objects involved are of equal stature

Inheritance Models is-a relationship Relationship between a class and its refined versions Superclass or Base class Subclass or Derived class Inheritance is transitive Discriminator : The property being abstracted by a particular inheritance Breath Vs. Depth of inheritance

Inheritance Notation

Inheritance Example Child Animal Girl Boy Dog Cat

Aggregation vs. Inheritance Aggregation represents part-of relationship Inheritance represents kind-of relationship Aggregation refers to object relationships Inheritance refers to class relationships