Jan 2005Ron McFadyen 92.39131 Qualified Associations ProductCatalogueProductDescription A one to many association can be altered in a diagram to a one.

Slides:



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

UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Jan 2003Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
Sept Ron McFadyen Interaction Diagrams - Chapter 15 Describe/illustrate sequence of message exchanges among objects that are working together.
November R McFadyen1 Aggregation and Composition – section 27.2 both are associations used to denote that an object from one class is part.
March Ron McFadyen1 Ch 17: Use Case Realizations with GRASP Patterns Assigning responsibilities to objects to achieve user goals Section 17.4.
Jan 16, Ron McFadyen1 Ch 9. Use-case model: drawing System Sequence Diagrams Iteration 1: a simple cash-only success scenario of Process Sale.
Lecturer: Sebastian Coope Ashton Building, Room G.18 COMP 201 web-page: Lecture.
UML – Class Diagrams.
Jan 2005 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Feb 18, R McFadyen1 Feb 18, 2002 Review of some modeling concepts Introduction of Moment-Interval.
Chapter 14 (Web): Object-Oriented Data Modeling
Winter 2007ACS-3913 Ron McFadyen1 Classes Represented by a rectangle with possibly 3 compartments Customer Name Address Customer Name Address getName()
ACS-3913Fall 2009 Ron McFadyen1 Contracts Used to help understand requirements more completely (and so may not always be necessary) based on assertions;
Feb 4, Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – (interfaces,
Oct Ron McFadyen1 Collaborations Collaboration : an arrangement of classes, links, roles in a context to implement some behaviour. Useful for.
© Copyright Eliyahu Brutman Programming Techniques Course.
MORE ON CLASS MODELS Lecture Outline Aggregation and composition Roles Navigability Qualified association Derived association Constraints Association.
November Ron McFadyen1 Design Class Diagrams n Class diagram with – classes – associations – attributes – methods – navigability – interfaces,
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
Structural Modeling: Class Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan CIS 4800.
 2008 Pearson Education, Inc. All rights reserved (Optional) Software Engineering Case Study: Identifying the Classes in the ATM Requirements.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 4th Edition Copyright © 2012 John Wiley & Sons, Inc. All rights.
UML Diagrams: Class Diagrams The Static Analysis Model Instructor: Dr. Hany H. Ammar Dept. of Computer Science and Electrical Engineering, WVU.
R McFadyen Chapter 7 Conceptual Data Modeling.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Slide 1 Structural Modeling Chapter 7. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
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 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.
PowerPoint Presentation for Dennis, Wixom, & Tegarden Systems Analysis and Design with UML, 3rd Edition Copyright © 2009 John Wiley & Sons, Inc. All rights.
Sept Ron McFadyen1 Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
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.
Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a more specific kind of thing (the.
Relationships Relationships between objects and between classes.
Object Oriented Analysis and Design Class and Object Diagrams.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
UML Class Diagram notation Indicating relationships between classes SE-2030 Dr. Mark L. Hornick 1.
Chapter 16: UML Class Diagrams
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
Sept 2004Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
Chapter 16 UML Class Diagrams.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) Modern Database Management 11 th Edition Jeffrey A. Hoffer, V. Ramesh, Heikki Topi © 2013 Pearson.
2007ACS Ron McFadyen1 Aggregation and Composition both are associations used to denote that an object from one class is part of an object of another.
UML Fundamental Elements. Structural Elements Represent abstractions in our system. Elements that encapsulate the system's set of behaviors. Structural.
UML Diagrams: Class Diagrams The Static Analysis Model
Chapter 5: Structural Modeling
ניתוח ועיצוב מערכות תוכנה אביב 2014
Domain Model Refinement
Dimensional Model January 14, 2003
Lec 3: Object-Oriented Data Modeling
Understand and Use Object Oriented Methods
Unit 2: Fundamentals of Computer Systems
Chapter 7: Entity-Relationship Model
Class Diagram Begins as a conceptual or analysis class model and evolves to a design class model Used throughout the development process. More detail added.
Chapter 16 Class Diagrams.
a generalization is a relationship between a general thing (the
Chapter 11: Class Diagram
Page 37 Figure 2.3, with attributes excluded
Presentation transcript:

Jan 2005Ron McFadyen Qualified Associations ProductCatalogueProductDescription A one to many association can be altered in a diagram to a one to one if there is an appropriate qualifier that identifies exactly one itemID is an attribute of ProductDescription that uniquely identifies an instance *1 ProductCatalogueProductDescription 1 1 itemID contains

Jan 2005Ron McFadyen Singleton Classes Random For some classes, it will be planned to only ever instantiate one object from that class Indicate this with a “1” in the upper righthand corner Later we will discuss the Singleton Pattern. 1

Jan 2005Ron McFadyen Interface classes AlarmClock An interface class is a collection of methods. We can use these to indicate that other classes implement the methods specified in the interface class attach() detach() notify() « interface » Subject

Jan 2005Ron McFadyen Aggregation and Composition both are associations used to denote that an object from one class is part of an object of another class HonoursProgrammeCourse An example of Aggregation: a course is part of an honours programme. The same module could be part of several honours courses “Software Engineering with Objects and Components” is part of both the “Software Engineering” and the “Computer Science” honours programmes **

Jan 2005Ron McFadyen Aggregation and Composition BoardSquare Composition is similar to, but stronger than aggregation. If you specify composition, then you are saying that one object owns its parts. A Board is made up of several Squares. A Square will belong to just one Board. If a Board is deleted, then its Squares are deleted too. What is the multiplicity at the composition end of the association? * Note: the 3 rd edition suggests not using Aggregation, instead us Composition if the business rules suggest it

Jan 2005Ron McFadyen Aggregation and Composition InvoiceInvoiceLine Consider Invoices and their Invoice Lines Question: Is the association aggregation or composition? ? ? *

Jan 2005Ron McFadyen Aggregation and Composition SaleSalesLineItem Consider Sales and their SalesLineItems Is the association an aggregation or a composition? ? ? *

Jan 2005Ron McFadyen Aggregation and Composition Consider the Product Catalogue and its Product Specifications. Is the association an aggregation or a composition? Consider the General Calendar and its Course Specifications. Is the association an aggregation or a composition?

Jan 2005Ron McFadyen Aggregation and Composition Hand Finger Palm Thumb Several associations sharing the same aggregation/composition can be drawn with converging lines

Jan 2005Ron McFadyen Aggregation and Composition Suppose a document comprises a TOC, a preface, a number of sections, and possibly an index. composition or aggregation?

Jan 2005Ron McFadyen Association Class Business rule: a store has a different merchant ID for each service Association Class: a modeling element that is both an association and a class. It has attributes, operations, multiplicities, etc. It can participate in other relationships.

Jan 2005Ron McFadyen Many to many associations likely candidate for an Association Class Limitation !!! each company object can be associated to a person object only once. If we wanted to provide for a person to be employed by the same company more than once, we would need to promote Employment to be a regular class. How do we model this?

Jan 2005Ron McFadyen Reflexive Association An association involving the same class more than once. marries Person 1 1

Jan 2005Ron McFadyen Reflexive Association An association involving the same class more than once. marries Person * *

Jan 2005Ron McFadyen Contrasting two models Can be very accurate: one person plays more than one role More difficult to implement: may need to mutate an object from one class to another

Jan 2005Ron McFadyen Packages Packages are used to organize model elements. name