OO Methodology Elaboration Iteration 3 – Part 1 Refining Models.

Slides:



Advertisements
Similar presentations
Text-Book Chapters (7 and 8) Entity-Relationship Model
Advertisements

Jan 2003Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
January Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box.
Jan Ron McFadyen1 Use Cases in the UML Functionality under consideration is represented by use cases (named ellipses) enclosed in a box Actors.
1 Software Testing and Quality Assurance Lecture 12 - The Testing Perspective (Chapter 2, A Practical Guide to Testing Object-Oriented Software)
Chapter 14 (Web): Object-Oriented Data Modeling
Class Diagram & Object Diagram
7M822 UML Class Diagrams advanced concepts 15 September 2008.
Chapter 2: Entity-Relationship Model (Continued)
Chapter 14: Object-Oriented Data Modeling
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
EER vs. UML Terminology EER Diagram Entity Type Entity Attribute
CSSE 374: Domain Model Refinements and Iteration 3 Preparations Q1 These slides and others derived from Shawn Bohner, Curt Clifton, Alex Lo, and others.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Chapter 4 The Relational Model.
Software Engineering 1 Object-oriented Analysis and Design Chap 30 Relating Use Cases.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 20 Object-Oriented.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology Khan younis.
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.
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.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
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, 2007 Chapter 7: Conceptual Data Modeling Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph S. Valacich,
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 15: Object-Oriented Data Modeling Modern Database Management 9 h Edition Jeffrey A.
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,
© 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.
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.
The Static Analysis Model Class Diagrams Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
CS212: Object Oriented Analysis and Design Lecture 13: Relationship between Classes.
Chapter 9 Applying UML and Patterns -Craig Larman
OO Methodology Elaboration Iteration 3 – Part 2 Refining Models.
Object Oriented Analysis & Design Using UML (CS-512) M-Tech CSE (Ist & 3rd Sem) Part Time Mr. Pawan Luthra Assistant Professor (CSE Deptt.) SBSSTC, Ferozepur.
UML The Unified Modeling Language A Practical Introduction Al-Ayham Saleh Aleppo University
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.
Object-Oriented Data Modeling
Design Model Lecture p6 T120B pavasario sem.
Relationships Relationships between objects and between classes.
Repetition af Domæne model. Artifact influence emphasizing the Domain Model.
Domain Modeling Yonglei Tao.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
OO Methodology Elaboration Iteration 2 - Design Patterns -
Keys for Relationship Sets The combination of primary keys of the participating entity sets forms a super key of a relationship set. – (customer-id, account-number)
CS212: Object Oriented Analysis and Design Lecture 32: Use case and Class diagrams.
Sept Ron McFadyen1 Use Cases Introduced by Ivar Jacobson in 1986 literal translation from Swedish ”usage case” Used to capture and describe.
Sept 2004Ron McFadyen Generalization (Ch 26) a generalization is a relationship between a general thing (the superclass or parent class) and a.
Elaboration Iteration 3 – Part 3 - Persistence Framework -
Analysis Yaodong Bi. Introduction to Analysis Purposes of Analysis – Resolve issues related to interference, concurrency, and conflicts among use cases.
Domain Model Refinement Notation Extensions. Things not seen before in the Domain Model Similar to the concepts in the Object Models Generalization and.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Lecture 26 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
OO Methodology Elaboration Iteration 3 – Part 3 - More Design Patterns -
Chapter 2: Entity-Relationship Model
COP Introduction to Database Structures
UML Diagrams: Class Diagrams The Static Analysis Model
Object-Oriented Modeling
Business System Development
Domain Model Refinement
UML Class Diagrams: Basic Concepts
Lec 3: Object-Oriented Data Modeling
Relating Use Cases popo.
Chapter 20 Object-Oriented Analysis and Design
a generalization is a relationship between a general thing (the
ITEC 3220A Using and Designing Database Systems
a generalization is a relationship between a general thing (the
Presentation transcript:

OO Methodology Elaboration Iteration 3 – Part 1 Refining Models

2 Table of Contents Iteration 1 –Use-Case Model –Process Sale Use Case –Domain Model –Design Model Iteration 2 –GRASP: More Patterns for Assigning Responsibilities –Designing Use-Case Realizations with GoF Design Patterns Iteration 3 –Iteration 3 and Its Requirement –Related Use Cases –Modeling Generalization –Refining the Domain Model –Adding New SSDs and Contracts –Modeling Behavior in Statechart Diagrams –Designing the Logical Architecture with Patterns –Organizing the Design and Implementation Model Packages –Introduction to Architectural Analysis and the SAD –Designing More Use-Case Realization with Paterns –Designing a Persistence Framework with Patterns

3 Iteration 3 Requirements Handle credit payment authorization Provide failover to local services when the remote services cannot be accessed. Provide support for POS device handling, such as the cash drawer and coin dispenser Support for persistent objects

4 Relating Use Cases Three methods of relating use cases –include –extend –generalize The include relationship –a relationship from a base use case to an inclusion use case –specify how the behavior of the inclusion use case can be inserted into the behavior of the base use case –an inclusion use case represents encapsulated behavior that potentially can be reused in multiple base use cases –an inclusion use case is not a separate instantiable classifier –an inclusion use case sets attribute values in the base use case –the base use case must not access the attributes of inclusions Process SaleProcess Rental Handle Credit Payment >

5 The include Relationship Use Case: Process Sale (the base use case) Main Success Scenario: 1.Customer arrives at a POS... 7.Customer pays and System handles payment... Extensions: 7b. Paying by credit: Include Handle Credit Payment 7c. Paying by check: Include Handle Check Payment Use Case: Process Rental (the base use case) Extensions:... 6b. Paying by credit: Include Handle Credit Payment Use Case: Handle Credit Payment (inclusion use case) Level: subfunction Main Success Scenario: 1.Customer enters their credit information. 2.System sends payment authorization request to an external Payment Authorization Service System Extensions: 2a. System detects failure to collaborate with external system: 1. System signals error to cashier. 2. Cashier asks Customer alternate payment.....

6 The extend Relationship –a relationship from an extension use case to a base use case –The extension use case incrementally modifies the base use case in a modular way –a base use case defines a set of extension points, references of locations in the base case –an extension use case contains a list of one or more insertion segments –an extension use case accesses and modifies attribute values in the base use case –the base use case must not access the attributes of extensions Process Sale Extension Points: Payment VIP Customer Handle Gift Certificate Payment > Payment [Customer presents a gift certificate]

7 The extend Relationship Use Case: Process Sale (base use case) Extension Points: VIP Customer, step 1. Payment, step 7. Main Success Scenario: 1.Customer arrives at a POS... 7.Customer pays and System handles payment... Use Case: Handle Gift Certificate Payment(extension) Trigger: Customer wants to pay with gift certificate Extension Points: Payment in Process Sale Level: subfunction Main Success Scenario: 1.Customer gives gift certificate to Cashier 2.Cashier enter gift certificate ID....

8 The extend Relationship Example : ATM

9 The generalize Relationship –a taxonomic relationship between a child use case and the parent use case –the parent describes the characteristics the child shares with other use cases –the child inherits the behavior sequence of the parent and may insert additional behavior into it. –the child may modify behavior steps inherited from the parent Verify Identity Check Password Retinal Scan

10 Comparison of Use Case Relationships

11 Modeling Generalization Generalization-specialization class hierarchy Generalization is the activity of identifying commonality among concepts and defining superclass (general concept) and subclass(special concept) Generalization is different from inheritance –inheritance is a mechanism for combining shared incremental descriptions to form a full description of an element

12 Modeling Generalization Conceptual Subclass Definition Conformance –100% of the conceptual superclass’s definition shold be applicable to the subclass –the subclass must conform to 100% of the superclass’s attribute and associations (100% rule) Conceptual Subclass Set Conformance –all members of a subclass set must be members of their superclass set. (Is-A rule)

13 Modeling Generalization When to Define a Conceptual Subclass –the subclass has additional attributes of interest. –the subclass has additional associations of interest. –the subclass concept is operated on, handled, reacted to, or manipulated differently than the superclass or other classes –the subclass concept represents an animate thing that behaves differently than the superclass or other classes When to Define a Conceptual Superclass –the potential conceptual subclasses represent variations of a similar concept –the subclasses will conform to the 100% and Is-A rules –all subclasses have the same attribute which can be factored out and expressed in the superclass –all subclasses have the same associations which can be factored out and related to the superclass

14 Abstract Conceptual Classes If every member of a class C must also be a member of a subclass, the class C is called an abstract conceptual class

15 NextGen POS Class Hierarchies Payment Classes Authorization Service

16 NextGen POS Class Hierarchies Authorization Transaction Classes –Degree of generalization

17 Modeling Changing States Do not model the states of a concept X as superclasses of X. Rather either: –define a state hierarchy and associate the states with X –Ignore showing the states of a concept in the domain; show the sates in a state diagram instead. Transition between Non-member Customer and Member Customer ???

18 Constraints on Generalization A constraint on a generalization specifies further information about how the generalization could be used and extended Predefined constraints –overlapping –disjoint –complete –incomplete Worker ButcherBaker Candlestick Maker {overlapping, incomplete} Customer Female Customer Male Customer {complete,disjoint}

19 Association –Association is semantic relationship between two or more classifiers that involves connection among their instances –Each instance of an association(a link) is a tuple (an ordered list) of references to objects Structure Advanced Topics –association class –n-ary association –derived association –qualifier AB q_name:C 0..* role qualifier multiplicity rolename navigability association path aggregation/ composition associate association name

20 Association Class Association class is an association that is also a class It may have attributes, operations and associations with other classes Semantics –a link(instance) of an association class takes its identity from the object references in it. job1 : c1 – p1 job2 : c1 – p2 job3 : c1 – p1 –an association is a set of tuples and has no duplicates among its object references Company Person Job salary 0..* employer employee duplicate (not correct)

21 Association Class Consider the following associations –implicit relationship by Job class –provides duplicates in relationship among Company and Person objects c1 – job1 – person1 c1 – job2 – person2 c1 – job3 – person1 An Example 1. a person owns stock (some number of shares) of a company 2. a person purchased stock of a company several times each with different price at different time duplicate (correct) Company Person Stock quantity 0..* CompanyPerson Job salary 0..* 1 1 CompanyPerson Purchase salary date cost 0..* 1 1 buyer seller buyer

22 Association Class NextGen POS Requirements –Authorization services assign a merchant ID to each store for identification –A payment authorization request from the store to an authorization service needs the merchant ID –A store has a different merchant ID for each service Placing Merchant ID in the Store class or AuthorizationService –it is incorrect because a Store can have more than one value for merchantID A better solution, not yet useful

23 Association Class Final Solution : using an association class Guidelines for adding association classes –an attribute is related to an association –instances of the association class have a life-time dependency on the association –there is many-to-many association between two concepts and information associated with the associated with the association itself –a link (an instance of association) is identified by two objects in it.

24 n-ary Association An association among three or more classes each instance of the association is an n-tuple of values from the respective classes Properties –navigability is meaningless –multiplicity may be specified but is less obvious and complicated –aggregation is meaningless Generally, n-ary associations are useful only when all the values are needed to uniquely determine a link An n-ary association is almost always implemented as a class whose attributes include pointers to the participant objects Year Player Team season goal keeper team * * *

25 n-ary Association Multiplicity in n-ary association –the multiplicity is defined with respect to the other n-1 ends. e.g. in a ternary association (A,B,C), the multiplicity in C states how many C objects may appear in association with a particular pair of A and B objects. Example: Course Registration –for a (course, student) pair, there is zero or one professor –for a (student, professor) pair, there are many courses –etc. Student Professor Course * * 0..1 Registration

26 n-ary Association Example(cont.) Student Professor Course * Registration * * 11 1 Student Professor Open Course 1 Registration 1..* * 11 1 Course * 1

27 Qualifiers Qualifier –a slot for an attribute or list of attributes on a binary association –the values of the attributes select a unique related object or a set of related objects from the entire set of objects –it is an index on the traversal of an association –qualified object vs target object –a qualifier always acts on an association whose multiplicity is many in the target direction The purpose of the qualifier is to reduce the multiplicity to one by adding the qualifier so that a query can be assured of returning a single value Bank account # Person * 1 multiplicity after qualification target class qualified class qualifier (bank, accont#) -> one person one person -> many (bank, account #)

28 Qualifiers Example Directory filename File * 0..1 (directory,filename) -> o or 1file directory -> many files file -> many (directory, filename) file-> many directories file -> many file names Directory filename File * * {same} same but different level of details (directory,filename) -> o or 1file directory -> many files file -> many (directory, filename) file-> 1 directory file -> many file names

29 Qualifiers Qualified Association in NextGen POS

30 Roles Role names Roles as Concepts vs Roles in Associations

31 Derived Elements Derived element is an element that can be computed from other elements and is included for clarity It is logically redundant and adds no semantic information Person birthdate /age { age = currentDate- birthdate } Company Person 1 * 1 * Department worksForDepartment /worksForCompany derived association

32 Constraints on Associations Ordered Exclusive-OR Insurance company Insurance contract Person Compnay {or} 1 0..* 1..* 0..*