COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis.

Slides:



Advertisements
Similar presentations
Conceptual Modeling in UML A super-short introduction by Ambjörn Naeve
Advertisements

OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
UML Class Diagram. UML Class Diagrams2 Agenda What is a Class Diagram? Essential Elements of a UML Class Diagram Tips.
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.
03/12/2001 © Bennett, McRobb and Farmer 2002 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
1 SWE Introduction to Software Engineering Lecture 23 – Architectural Design (Chapter 13)
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.
Chapter 14 (Web): Object-Oriented Data Modeling
Requirements Analysis 15.1 Specialised Associations b515.ppt © Copyright De Montfort University 2000 All Rights Reserved INFO2005 Requirements Analysis.
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 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.
7M822 UML Class Diagrams advanced concepts 15 September 2008.
7M822 UML Class Diagrams advanced concepts 14 October 2010.
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.
COMP1007 Intro to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture.
PRJ566: PROJECT PLANNING AND MANAGEMENT Class Diagrams.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Refining the Requirements Model
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.
R McFadyen Chapter 7 Conceptual Data Modeling.
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.
CHAPTER 13 (ONLINE): OBJECT-ORIENTED DATA MODELING © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
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,
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.
Domain Modeling Part2: Domain Class Diagram Chapter 4 pp part 2 1.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 13 (Online): Object-Oriented Data Modeling Modern Database Management 10 th Edition.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 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.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
03/12/2001 © Bennett, McRobb and Farmer 2005 Refining the Requirements Model Based on Chapter 8 of Bennett, McRobb and Farmer: Object Oriented Systems.
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
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.
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.
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
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.
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.
EKT472: Object Oriented Programming
Understand and Use Object Oriented Methods
Object Oriented System Design Class Diagrams
Refining the Requirements Model
Presentation transcript:

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved COMP1007 Introduction to Requirements Analysis Lecture 6 Specialised Associations :

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Association Navigability v In design, navigability has another meaning –We need to know if one object can send messages to another object –Navigability shows which way messages can travel along an association v This is not usually an issue in analysis –More strongly concerned with semantics - i.e. the meaning of business requirements

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Class Roles v Roles help clarify when a class can participate in an association v Only employees in the role of driver are associated with a vehicle a:Vehiclean:Employee 1..*0..1 IsAssigned driver an:Employee 1..*0..1IsAssigned a:Vehicle

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Class Roles v A common role example is the supervisor-supervisee relationship v Every manager doesn’t supervise every team member - only those in their own team a:TeamMembera:Manager 1..*0..1 Supervises a:TeamMembera:Manager 1..*0..1 Supervises team leader

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Class Roles v An object can play multiple roles v It can participate in different associations, either at different times or simultaneously a:Manager a:TeamMember 1..*0..1 Supervises team leader driver 1..* 0..1 IsAssigned a:Vehicle

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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?

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Association Qualifiers v Qualifiers are generally more useful in design than in analysis –E.g to design the indexing that supports efficient message pathways v But they can also sometimes help to clarify our understanding of the domain

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved UML Notation: Aggregation v Physical containment: Airspace Stacking Queue 1..n 1 * 1 Passenger Flight 0..n 1 v Note this example is dynamic, changing as one flight lands and another arrives

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved UML Notation: Aggregation Car Whole Part Aggregate Engine Wheels Body Components v Physical composition:

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Composition v A strong form of aggregation: –The whole has lifetime ownership of its parts –If a whole is destroyed, so are all its parts –A part may belong only to one whole at a time –A part may be removed or added to a whole –Only when explicitly removed from one whole can a part be added to another whole

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved UML Notation:Composition Cat Legs Head 1 1 Tail v A cat example is better modelled as composition:

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Using Aggregation & Composition v There is debate about the usefulness of these modelling constructs in analysis v They can help in handling complexity v They can express important structure in the problem domain v They contribute to the design of robust, reusable components v But Larman says “when in doubt, don’t”

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Generalisation v Another term for inheritance relationship v Applies only where: – Superclass is more general than subclasses – Subclass is fully consistent with superclass – Subclass adds additional (specialised) features v Familiar basis of most classification v Formally equivalent to “A is a kind of B”

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved UML Notation: Generalisation StaffMember name address phone nextOfKin calcHolidays pay AdminStaff grade AcademicStaff specialism assignModules Generalisation Base Class “Derived” Classes

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved UML Notation: Generalisation University Physical Resource * SupportAcademic Full-timePart-time TechAdmin * Person StudentStaff

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Using Generalisation v In analysis, inheritance offers a way to: –Express the semantics of logical classifications –Organise complexity v Like aggregation, it is even more useful during design v Here it provides a mechanism for reuse of base class specifications

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 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

COMP1007 Introduction to Requirements Analysis © Copyright De Montfort University 2002 All Rights Reserved Further Reading Maciaszek, Requuirements Analysis & Systems Design Chapters 2 & 5 Bennett, S. et al. “Object-Oriented Systems Analysis & Design using UML” McGraw-Hill 1999, esp Chs 6 and 7 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