CRC Modeling. Recap Class Modeling – How to Identify classes, its attributes and functions? – Class selection criteria – Relationships Associations Generalization.

Slides:



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

Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
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.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
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 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 5: Restaurant.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
UML Class Diagram and Packages Written by Zvika Gutterman Adam Carmi.
Irwin/McGraw-Hill Copyright © 2004 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS6th Edition.
Slide 1 Chapter 7 Structural Modeling. Slide 2 Key Ideas A structural or conceptual model describes the structure of the data that supports the business.
UML Class Diagram and Packages
Class Diagram & Object Diagram
Object-Oriented Systems Analysis and Design Using UML
Sharif University of Technology1 Design and Use-case Realization Software Engineering Laboratory Fall 2006.
6. 2Object-Oriented Analysis and Design with the Unified Process Objectives  Explain how events can be used to identify use cases that define requirements.
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.
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Unified Modeling Language
Structural Modeling: Class Diagrams Copyright © 2009 John Wiley & Sons, Inc. Copyright © 2005 Pearson Education Copyright © 2009 Kannan Mohan CIS 4800.
Object-Oriented Systems Analysis and Design Using UML
CS212: Object Oriented Analysis and Design Lecture 4: Objects and Classes - I.
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.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 4 - Domain Classes.
Lab 04.
CS3773 Software Engineering Lecture 04 UML Class Diagram.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
Developed by Reneta Barneva, SUNY Fredonia for CSIT 425 Requirements Modeling.
بسم الله الرحمن الرحيم ” اللهم أنت ربي لا إله إلا أنت خلقتني و أنا عبدك وأنا على عهدك ووعدك ما استطعت ، أعوذ بك من شر ما صنعت ، أبوء لك بنعمتك على و أبوء.
GRASP: Designing Objects with Responsibilities
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 03. Classes,
Class-based Modeling.
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 24. Review ANALYSIS Level Class Diagram – Identifying Entities – Identifying Attributes – Identifying Operations.
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.
Object-Oriented Systems Analysis and Design Using UML
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.
CIS 112 Exam Review. Exam Content 100 questions valued at 1 point each 100 questions valued at 1 point each 100 points total 100 points total 10 each.
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.
CSCI-383 Object-Oriented Programming & Design Lecture 10.
Object-Oriented Analysis and Design CHAPTERS 9, 31: DOMAIN MODELS 1.
Chapter 17 – Object- Oriented Design. Chapter Goals To learn about the software life cycle To learn about the software life cycle To learn how to discover.
Karolina Muszyńska Based on: S. Wrycza, B. Marcinkowski, K. Wyrzykowski „Język UML 2.0 w modelowaniu SI”
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
CS212: Object Oriented Analysis and Design Lecture 33: Class and Sequence Diagram.
Chapter 4 Basic Object-Oriented Concepts. Chapter 4 Objectives Class vs. Object Attributes of a class Object relationships Class Methods (Operations)
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Object-Oriented Systems Analysis and Design Using UML Systems Analysis and Design,
ITEC0724 Modern Related Technology on Mobile Devices Lecture Notes #2 1.
CS223: Software Engineering Lecture 9: System Modeling.
UML Class Diagrams Sequence Diagrams CSE230 Dae-Kyoo Kim.
McGraw-Hill/Irwin© 2008 The McGraw-Hill Companies, All Rights Reserved Chapter 17 Object-Oriented Design and Modeling Using the UML.
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.
25/2/16. Software Design (UML) ClassName attributes operations A class is a description of a set of objects that share the same attributes, Operations.
Data Modelling 2014, Fall Pusan National University Ki-Joune Li.
Class Diagram Associations Class Diagrams, Class Stereotypes, Class Associations Dr. Neal CIS 480.
An informal, team oriented, OO design system
Unified Modeling Language (UML)
COMP 2710 Software Construction Class Diagrams
Unified Modeling Language
Class diagram Description
Advanced Java Programming
UML Class Diagrams: Basic Concepts
Object Oriented Analysis and Design
2018, Fall Pusan National University Ki-Joune Li
UML Class Diagram.
Unified Modelling Language
CRC Card Design A CRC Model is a collection of cards (usually standard index cards or larger) that are divided into three sections. 1. Class 2. Responsibility.
2019, Fall Pusan National University Ki-Joune Li
Presentation transcript:

CRC Modeling

Recap Class Modeling – How to Identify classes, its attributes and functions? – Class selection criteria – Relationships Associations Generalization

Content Class Modeling – Relationships Dependency Realization – Constraints, Notes CRC Modeling

4 Associations (cont.) StaffMemberStudent 1..**instructs instructor Association name Role name Multiplicity Navigable (uni-directional) association Courses pre - requisites 0..3 Reflexive association Role *

5 Aggregation A special form of association that models a whole-part relationship between an aggregate (the whole) and its parts. – Models a “is a part-part of” relationship. Whole Part Car Door House 1..*2..*

UML Class Diagrams6 Aggregation (cont.) Aggregation tests: – Is the phrase “part of” used to describe the relationship? A door is “part of” a car – Are some operations on the whole automatically applied to its parts? Move the car, move the door. – Are some attribute values propagated from the whole to all or some of its parts? The car is blue, therefore the door is blue. – Is there an intrinsic asymmetry to the relationship where one class is subordinate to the other? A door is part of a car. A car is not part of a door.

7 Composition A strong form of aggregation – The whole is the sole owner of its part. The part object may belong to only one whole – Multiplicity on the whole side must be zero or one. – The life time of the part is dependent upon the whole. The composite must manage the creation and destruction of its parts. CirclePoint 3..* 1 Polygon Point Circle

8 Generalization Indicates that objects of the specialized class (subclass) are substitutable for objects of the generalized class (super-class). – “is kind of” relationship. Shape {abstract} Circle Super Class Sub Class An abstract class Generalization relationship {abstract} is a tagged value that indicates that the class is abstract. The name of an abstract class should be italicized

9 Generalization A sub-class inherits from its super-class – Attributes – Operations – Relationships A sub-class may – Add attributes and operations – Add relationships – Refine (override) inherited operations A generalization relationship may not be used to model interface implementation.

10 Dependency A dependency indicates a semantic relation between two or more classes in which a change in one may force changes in the other although there is no explicit association between them. A stereotype may be used to denote the type of the dependency. IteratorVector >

UML Class Diagrams11 Realization A realization relationship indicates that one class implements a behavior specified by another class (an interface or protocol). An interface can be realized by many classes. A class may realize many interfaces. LinkedList > List LinkedList List

UML Class Diagrams12 Constraint Rules and Notes Constraints and notes annotate among other things associations, attributes, operations and classes. Constraints are semantic restrictions noted as Boolean expressions. – UML offers many pre-defined constraints. id: long { value > 0 } Customer Order *1 { total < $50 } may be canceled Constraint Note

Examples

Reference:

CRC Cards A CRC card is divided into three sections (Beck & Cunningham, 1989; Ambler, 1995)

Responsibilities and Collaborations A responsibility is anything that a class knows or does. Sometimes a class will have a responsibility to fulfill, but will not have enough information to do it. When this happens it has to collaborate with other classes to get the job done.

CRC Model A CRC model is a collection of CRC cards that represent whole or part of an application or problem domain. The most common use for CRC models is to gather and define the user requirements for an object-oriented application. Collaborating cards are placed close to each other

Creating CRC Model 1.Put together the CRC modeling team. 2.Organize the modeling room. 3.Do some brainstorming. 4.Explain the CRC modeling technique. 5.Iteratively perform the steps of CRC modeling. 6.Perform use-case scenario testing.

CRC Team Business Domain Experts (BDEs). Facilitator. Scribe(s). Observers.

Room preparation Reserve a meeting room that has something write on. Bring CRC modeling supplies. Have a modeling table Have chairs and desks for the scribe(s). Have chairs for the BDEs. Have chairs for the observers

Brainstorming Set of questions: Who is this system for? What will they do with the system? Why do we do this? Why do we do this the way that we do? What business needs does this system support? What do/will our customers want/demand from us? How is the business changing? What is our competition doing? Why? How can we do it better? Do we even need to do this? If we were starting from scratch, how would we do this? Just because we were successful in the past doing this, will we be successful in the future?

Brainstorming (cont…) Can we combine several jobs into one? Do we want to? How will people’s jobs be affected? Are we empowering or disempowering them? What information will people need to do their jobs? Is work being performed where it makes the most sense? Are there any trivial tasks that we can automate? Are people performing only the complex tasks that the system can’t handle? Will the system pay for itself? Does the system support teamwork, or does it hinder it? Do our users have the skills/education necessary to use this system? What training will they need? What are our organization’s strategic goals and objectives? Does this system support them? How can we do this faster? How can we do this cheaper? How can we do this better?

Explain the CRC Modeling Technique Facilitator should describe the CRC modeling process. This usually takes between ten and fifteen minutes and will often include the creation of several example CRC cards. Lead BDEs through creation of example CRC cards

Perform The Iterative Steps of CRC Modeling Find classes – Look for anything that interacts with the system, or is part of the system – Ask yourself “Is there a customer?” – Follow the money – Look for reports generated by the system – Look for any screens used in the system – Immediately prototype interface and report classes – Look for the three to five main classes right away – Create a new card for a class immediately – Use one or two words to describe the class – Class names are singular

Find responsibilities – Ask yourself what the class knows – Ask yourself what the class does – If you’ve identified a responsibility, ask yourself what class it "belongs" to – Sometimes get responsibilities that we won’t implement, and that’s OK – Classes will collaborate to fulfill many of their responsibilities Define collaborators – Collaboration occurs when a class needs information that it doesn’t have – Collaboration occurs when a class needs to modify information that it doesn’t have – There will always be at least one initiator of any given collaboration – Sometimes the collaborator does the bulk of the work – Don’t pass the buck – New responsibilities may be created to fulfill the collaboration

Define use-cases – The BDEs will identify them as responsibilities of actor classes – Do some brainstorming – Transcribe the scenarios onto cards Arrange the cards on the table – Cards that collaborate with each other should be close to one another on the desk – The more that two cards collaborate, the closer that they should be on the desk – Expect to be moving the cards around a lot at the beginning – Put "busy" cards towards the center of the table – Actually move them around – People will identify relationships/associations between classes as they move them around

Perform Use-Case Scenario Testing Call out a new scenario Determine which card should handle the responsibility Update the cards whenever necessary Describe the processing logic Collaborate if necessary Pass the ball back when done

How CRC Modeling Fits in?

CRC Modeling Tips and Techniques Send ahead an agenda a few days before the modeling session Prominently display the CRC definitions Use their terminology Keep it low tech Expect to prototype Expect to take a few days Get management support Include CRC modeling in your system development life cycle Do CRC modeling with front-line staff only

Advantages of CRC Modeling The experts do the analysis User participation increased Breaks down communication barriers It’s simple and straightforward It’s non-threatening to users It’s inexpensive and portable It goes hand-in-hand with prototyping It leads directly into class diagramming

Disadvantages of CRC Modeling It’s threatening to some developers It’s hard to get users together CRC cards are limited

Summary Class Diagrams CRC Modeling

Reference Ambler, S.W., (1998) CRC Modelling: Bridging the Communication Gap Between Developers and Users, An AmbySoft Inc. White Paper