Requirements Analysis 15.1 Specialised Associations - 2005b515.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.

Slides:



Advertisements
Similar presentations
ESE Einführung in Software Engineering 6. Modeling Objects and Classes Prof. O. Nierstrasz.
Advertisements

Object-oriented modeling Class/Object Diagrams
Conceptual Modeling in UML A super-short introduction by Ambjörn Naeve
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
Sucha Smanchat  Steps in OOAD using UML  Use Case Diagram  Sequence Diagram / Communication Diagram  Class Diagram  State.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
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.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to Requirements Analysis Object Oriented.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Intro to Systems Requirements COMP1007 © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Systems Requirements Use-Cases.
Requirements Analysis 1. 1 Introduction b514.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Objects,
Requirements Analysis Classes & Associations b510.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.
Class Diagram & Object Diagram
COMP1007 Intro to Systems Requirements © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Intro to Systems Requirements Lecture 4 Identifying.
Requirements Analysis 9. 1 OO Concepts b509.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Object.
Requirements Analysis 4. 1 Use Case I b504.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Use-Cases.
ESE Einführung in Software Engineering 6. Modeling Objects and Classes Prof. O. Nierstrasz.
Requirements Analysis Classes & Associations b510.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 Class and Object Diagrams PRACTICAL OBJECT-ORIENTED DESIGN WITH.
COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Use Case Analysis – continued
Modelling classes Drawing a Class Diagram. Class diagram First pick the classes –Choose relevant nouns, which have attributes and operations. Find the.
2-1 © Prentice Hall, 2004 Chapter 2: Introduction to Object Orientation (Adapted) Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra,
Unified Modeling Language
Refining the Requirements Model
ZEIT2301 Design of Information Systems Structural Design: Class Diagrams School of Engineering and Information Technology Dr Kathryn Merrick.
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 2: Modelling.
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
Association Class Generalization/Specialization Whole-Part Page More Associations 1.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
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.
1 © Prentice Hall, 2002 Chapter 14: Object-Oriented Data Modeling Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
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.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
Unified Modeling Language © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Unified Modeling Language Susan D. Urban and Suzanne W. Dietrich Department.
INFO 620Lecture #81 Information Systems Analysis and Design Class Diagram Refinement INFO 620 Glenn Booker.
03/12/2001 © Bennett, McRobb and Farmer 2005 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
Modeling system requirements. Purpose of Models Models help an analyst clarify and refine a design. Models help simplify the complexity of information.
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.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
What is a Structural Model?
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.
Class Diagram. Classes Software Design (UML) Class Name attributes operations A class is a description of a set of objects that share the same attributes,
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.
Domain Modeling Yonglei Tao.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Database Design – Lecture 12 Object Oriented Database Design cont’d.
Class Diagram Chapter 21 Applying UML and Patterns Craig Larman.
Chapter 12 Object-oriented design for more than one class.
Chapter 16 UML Class Diagrams 1CS6359 Fall 2012 John Cole.
© Shamkant B. Navathe CC Enhanced Entity-Relationship Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
Unified Modeling Language (UML)
Object-Oriented Modeling
EKT472: Object Oriented Programming
Refining the Requirements Model
Presentation transcript:

Requirements Analysis 15.1 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis Specialised Associations: Roles, Qualifiers, Aggregation, Composition & Inheritance Department of Information Systems

Requirements Analysis 15.2 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Learning Objectives Understand significance of, and notation for: v Navigability v Roles and Qualifiers v Aggregation v Composition v Inheritance v Self-association

Requirements Analysis 15.3 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Association Navigability v Associations are normally read left to right, but not always possible to draw neatly v Navigability arrows show which way to read an association label v A module is not enrolled on a student! a:StudentINFO2005:Module EnrolledOn

Requirements Analysis 15.4 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Association Navigability v In design, navigability has another meaning v This is not usually an issue in analysis

Requirements Analysis 15.5 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Class Roles v Roles help clarify v Only employees a:Vehiclean:Employee 1..*0..1 IsAssigned driver an:Employee 1..*0..1IsAssigned a:Vehicle

Requirements Analysis 15.6 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Class Roles v A common role v Every manager a:TeamMembera:Manager 1..*0..1 Supervises a:TeamMembera:Manager 1..*0..1 Supervises team leader

Requirements Analysis 15.7 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Class Roles v An object can play a:Manager a:TeamMember 1..*0..1 Supervises team leader driver 1..* 0..1 IsAssigned a:Vehicle

Requirements Analysis 15.8 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Association Qualifiers v Superficially similar to roles, qualifiers are actually quite different v A qualifier identifies the subset of objects that link to another object: “[It] distinguishes the set of objects at the far end of an association based on the qualifier value” Larman, 1998

Requirements Analysis 15.9 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Association Qualifiers Product Specification Catalogue 1..*1Contains productCode description Product Specification Catalogue 11 Contains productCode v Note the change of multiplicity v From unspecified many down to exactly one v A catalogue contains product specs v How do they relate?

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Association Qualifiers v Qualifiers are generally more useful in design than in analysis v But they can also sometimes help to clarify our understanding of the domain

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Aggregation v A special form of association v Models Whole-Part relationships v Aggregate (whole) may delegate some responsibilities to its parts v Parts are encapsulated v Aggregate (usually) presents the sole interface to other bits of the model

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Aggregation v The Rational people say that aggregation expresses: –Physical containment, e.g. car + passengers... –Physical composition, e.g. car + engine, body, wheels... –Conceptual collection, e.g family + mother, father, daughter… Jacobson et al, 1999

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation: Aggregation v Physical containment: Airspace Stacking Queue 1..n 1 * 1 Passenger Flight 0..n 1

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation: Aggregation Car Whole Part Aggregate Engine Wheels Body Components v Physical composition:

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation: Aggregation v Conceptual collection: Analysis Package * Use Case Realisation Analysis Class * * v Note the new notation for package v Analysis packages often become distinct subsystems in the software Adapted from Jacobson et al, 1999

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Composition v A strong form of aggregation:

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation:Composition Car Engine Wheels Body v Actually, the car example is better modelled as composition:

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Using Aggregation & Composition v Usefulness in analysis?

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Generalisation v Another term for inheritance relationship v Applies only where: v Familiar basis of most classification v Formally equivalent to “A is a kind of B”

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved “Superclass is more general” v A superclass abstracts out some common features of its subclasses v May be common attributes, operations or associations AcademicStaff specialism assignModules pay calcHolidays name address phone nextOfKin AdminStaff grade calcHolidays pay name address phone nextOfKin

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation: Generalisation StaffMember name address phone nextOfKin calcHolidays pay AdminStaff grade AcademicStaff specialism assignModules Generalisation Base Class “Derived” Classes

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved “Subclass is fully consistent...” v Every subclass inherits everything in its superclass definition v Redefined operations appear to break this rule, but actually they don’t v Suppose academic staff salaries are calculated differently from admin staff  We may still define a generic pay operation at superclass level

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation: Generalisation StaffMember.pay is an abstract, generic definition of the operation AcademicStaff specialism assignModules pay AdminStaff grade calcHolidays pay StaffMember name address phone nextOfKin calcHolidays pay > Each subclass redefines this by adding the detailed logic for its own unique method of payment Note > stereotype on StaffMember

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved “Subclass adds features...” v Every subclass is more specialised than all its superclasses: AcademicStaff specialism assignModules pay Person name address phone Staff pay calcHolidays dateAppointed staffNumber extension Student enrolOnModule passLevel nextOfKin currentLevel dateEnrolled PartTimeStudent studyDay

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved UML Notation: Generalisation University Physical Resource * SupportAcademic Full-timePart-time TechAdmin * Person StudentStaff

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Using Generalisation v In analysis, inheritance offers a way to: v Even more useful during design v Mechanism for reuse of base class specifications

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Self-association v An object can have links with other objects of the same class v E.g. team members take turns at leading a team TeamMember leader led 1 * LeadsTeam v Note the use of roles to clarify multiplicities

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Self-association v Often combined with aggregation structures v E.g. recursive “parts explosion” for complex assemblies: Assembly 1 * Subassembly * 1 * 1 Part v Some assemblies are part of other assemblies

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Summary Explained significance of, and notation for: v Association Navigability v Class Roles and Association Qualifiers v Aggregation v Composition v Inheritance v Self-association

Requirements Analysis Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved Further Reading Bennett, S. et al. “Object-Oriented Systems Analysis & Design using UML” McGraw-Hill 1999, esp Chs 7 and 8 Britton, C. and Doake, J. “Object-Oriented Systems Development: a Gentle Introduction” McGraw-Hill 2000 Jacobson, I. et al. “The Unified Software Development Process” Addison Wesley 1999 Larman, C. “Applying UML and Patterns” Prentice Hall 1998 Rational Unified Process, 2000