Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling.

Similar presentations


Presentation on theme: "Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling."— Presentation transcript:

1 Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling John Wiley & Sons, Inc. Copyright 2005

2 Slide 2 Copyright © 2005 John Wiley & Sons, Inc. All rights reserved. Reproduction or translation of this work beyond that permitted in Section 117 of the 1976 United States Copyright Act without the express written permission of the copyright owner is unlawful. Request for further information should be addressed to the Permissions Department, John Wiley & Sons, Inc. The purchaser may make back-up copies for his/her own use only and not for redistribution or resale. The Publisher assumes no responsibility for errors, omissions, or damages, caused by the use of these programs or from the use of the information contained herein.

3 Slide 3 Structural Modeling Chapter 7

4 Slide 4 Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in an organization.. The structure of data used in the system is represented through CRD cards, class diagrams, and object diagrams.

5 Slide 5 STRUCTURAL MODELS

6 Slide 6 Purpose of Structural Models Reduce the “semantic gap” between the real world and the world of software Create a vocabulary for analysts and users Represent things, ideas, and concepts of importance in the application domain

7 Slide 7 Classes Are templates for creating instances or objects Concrete classes are used to create instances or objects Abstract classes are useful abstractions Typical examples of class domains: Application domain, user interface, data structure, file structure, operating environment, document, and multimedia classes In this class we are mainly concerned of the application domain classes

8 Slide 8 Attributes Units of information relevant to the description of the class Only attributes important to the task should be included

9 Slide 9 Operations Action that instances/objects can take Focus on relevant problem- specific operations (at this point)

10 Slide 10 Relationships Generalization Enables inheritance of attributes and operations (i.e., person, doctor) Aggregation Relates parts to wholes (i.e., nurse and doctor are part of a health team) Association Miscellaneous relationships between classes (i.e., appointment leads to a bill)

11 Slide 11 CLASS-RESPONSIBILITY- COLLABORATION CARDS

12 Slide 12 Responsibilities and Collaborations Knowing responsibilities are things that an instance of class must be capable of knowing (values of attributes) Doing responsibilities are things that an instance of a class must be capable of doing (operations) A set of classes that support the business process described in a use case is called a collaboration A collaboration allows the analyst to think in terms of clients, servers and contracts (i.e., patient makes an appointment with a doctor)

13 Slide 13 A CRC Card

14 Slide 14 Back of CRC Card

15 Slide 15 CLASS DIAGRAMS

16 Slide 16 Example Class Diagram

17 Slide 17 Class Diagram Syntax A CLASS AN ATTRIBUTE AN OPERATION AN ASSOCIATION Class 1 -attribute +operation () Attribute name/ derived attribute name operation name () 1..*0..1 ______verb phrase____

18 Slide 18 More on Attributes Derived attributes /age, for example can be calculated from birth date and current date Visibility Public (not hidden from any object) Protected (hidden from all other objects except immediate sub classes) Private (default visibility; hidden from all other classes)

19 Slide 19 More on Operations Constructor Creates an object Query Makes information about state available to other objects without altering the object Update Changes values of some or all attributes

20 Slide 20 More on Relationships Class can be related to itself (role) Multiplicity Exactly one, zero or more, one or more, zero or one, specified range, multiple disjoint ranges Association class (i.e., treatment depends on both symptoms and illness being treated)

21 Slide 21 Simplifying Class Diagrams The view mechanism shows a subset of information Packages show aggregations of classes (or any elements in UML)

22 Slide 22 Object Diagrams

23 Slide 23 CREATING CRC CARDS AND CLASS DIAGRAMS

24 Slide 24 Object Identification Textual analysis of use-case information Nouns suggest classes Verbs suggest operations Creates a rough first cut Common object list Incidents Roles

25 Slide 25 Patterns Useful groupings of classes that recur in various situations Transactions Transaction class Transaction line item class Item class Location class Participant class

26 Slide 26 Steps for Object Identification and Structural Modeling 1. Create CRC cards by performing textual analysis on the use-cases. 2. Brainstorm additional candidate classes, attributes, operations, and relationships by using the common object list approach. 3. Role-play each use-case using the CRC cards. 4. Create the class diagram based on the CRC cards. 5. Review the structural model for missing and/or unnecessary classes, attributes, operations, and relationships. 6. Incorporate useful patterns. 7. Review the structural model.

27 Slide 27

28 Slide 28

29 Slide 29 Summary CRC cards capture the essential elements of a class. Class and object diagrams show the underlying structure of an object- oriented system. Constructing the structural model is an iterative process involving: textual analysis, brainstorming objects, role playing, creating the diagrams, and incorporating useful patterns.

30 Slide 30 Expanding the Domain A quirky and interesting tutorial regarding CRC cards can be found at: http://www.csc.calpoly.edu/~d butler/tutorials/winter96/crc_b/


Download ppt "Slide 1 Systems Analysis and Design with UML Version 2.0, Second Edition Alan Dennis, Barbara Haley Wixom, and David Tegarden Chapter 7: Structural Modeling."

Similar presentations


Ads by Google