Adapted from (Zenebe & Miao, 2001) CRC Cards A tool and method for systems analysis and design Part of the OO development paradigm Highly interactive and.

Slides:



Advertisements
Similar presentations
CRC Before you can build an object-oriented system, you have to define the classes (objects) that represent the problem to be solved, how the classes relate.
Advertisements

CRC Cards - Tutorial Jun & Azene
Design by Contract.
Chapter 10: Designing Databases
CRC Cards (class-responsibility-collaborator)
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Introduction To System Analysis and Design
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
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.
Algorithms and Problem Solving. Learn about problem solving skills Explore the algorithmic approach for problem solving Learn about algorithm development.
Lecture 4 Class Responsibility Collaboration Cards
1 Lecture 2: Elaboration Tasks and Domain Modeling.
Software Engineering CSE470: Requirements Analysis 1 Requirements Analysis Defining the WHAT.
SOS OOP Fall 2001 Object Oriented Programming in Java Week 1 Read a design Design a small program Extract a design Run a VAJ program Change that program,
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
9 1 Chapter 9 Database Design Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Com S 362: Object-Oriented Analysis and Design Class, Responsibilities, Collaborations, CRC Cards Com S 362: Object-Oriented Analysis and Design Oct 18,
Domain Modeling (with Objects). Motivation Programming classes teach – What an object is – How to create objects What is missing – Finding/determining.
Object-Oriented Analysis and Design
The chapter will address the following questions:
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
Introduction To System Analysis and design
Use Cases Why use ‘em? How do they work? UC diagrams Using them later in the software development cycle.
ICT Management page 1MBA BORM - BORM © - Business Object Relation Modeling Know-How Fund of British Council, ČVUT v Praze, ČZU Praha,
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 6 Slide 1 Chapter 6 Requirements Engineering Process.
المحاضرة الثالثة. Software Requirements Topics covered Functional and non-functional requirements User requirements System requirements Interface specification.
ITEC224 Database Programming
INT-Evry (Masters IT– Soft Eng)IntegrationTesting.1 (OO) Integration Testing What: Integration testing is a phase of software testing in which.
2/6/01D-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Using PARTS to Illustrate Requirements Concepts.
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.
Databases From A to Boyce Codd. What is a database? It depends on your point of view. For Manovich, a database is a means of structuring information in.
11 Partnership for Performance How to hear this lecture Click on the icon: to hear the narration for each slide.
1 Object-Oriented Analysis Use Case Driven. 2 The outline method for OOA 1.Identify object classes within the problem domain 2.Define the behaviour of.
1 Software Design Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13, 5 th edition and Ch. 10, 6 th edition.
1 CMPT 275 Software Engineering Requirements Gathering Activity Janice Regan,
SWE © Solomon Seifu ELABORATION. SWE © Solomon Seifu Lesson 10 Use Case Design.
Chapter 17 GRASP: Designing Objects with Responsibilities. 1CS6359 Fall 2011 John Cole.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
Approaching a Problem Where do we start? How do we proceed?
1 Software Design Overview Reference: Software Engineering, by Ian Sommerville, Ch. 12 & 13.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
Systems Analysis and Design in a Changing World, 3rd Edition
Practical Object-Oriented Design with UML 2e Slide 1/1 ©The McGraw-Hill Companies, 2004 PRACTICAL OBJECT-ORIENTED DESIGN WITH UML 2e Chapter 4: Restaurant.
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
CS Overview of CRC CS 4311 B. Beck and W. Cunningham, A Laboratory for Teaching Object-Oriented Thinking, OOPSLA ’89, October 1-6, R. Wirfs-Brock,
Lecture 6: Structural Modeling
1 What is OO Design? OO Design is a process of invention, where developers create the abstractions necessary to meet the system’s requirements OO Design.
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.
Design Model Lecture p6 T120B pavasario sem.
ESIP Semantic Web Products and Services ‘triples’ “tutorial” aka sausage making ESIP SW Cluster, Jan ed.
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.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Software Engineering1  Verification: The software should conform to its specification  Validation: The software should do what the user really requires.
12/24/2015B.Ramamurthy1 Analysis and Design with UML: Discovering Classes Bina Ramamurthy.
Requirement engineering & Requirement tasks/Management. 1Prepared By:Jay A.Dave.
21/1/ Analysis - Model of real-world situation - What ? System Design - Overall architecture (sub-systems) Object Design - Refinement of Design.
OOD OO Design. OOD-2 OO Development Requirements Use case analysis OO Analysis –Models from the domain and application OO Design –Mapping of model.
Fusion Design Overview Object Interaction Graph Visibility Graph Class Descriptions Inheritance Graphs Fusion: Design The overall goal of Design is to.
1 Unified Modeling Language Michael K. Wildes University of California, Riverside – Extension Program Presentation 2.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
OBJECT-ORIENTED TESTING. TESTING OOA AND OOD MODELS Analysis and design models cannot be tested in the conventional sense. However, formal technical reviews.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Dillon: CSE470: ANALYSIS1 Requirements l Specify functionality »model objects and resources »model behavior l Specify data interfaces »type, quantity,
CRC Cards: Overview Emerson Murphy-Hill Creative Commons Attribution 4.0 License. Material Produced by NCSU Software Engineering Faculty.
An informal, team oriented, OO design system
Elaboration popo.
Analysis models and design models
Copyright 2007 Oxford Consulting, Ltd
Chapter 22 Object-Oriented Systems Analysis and Design and UML
ITEC324 Principle of CS III
Presentation transcript:

Adapted from (Zenebe & Miao, 2001) CRC Cards A tool and method for systems analysis and design Part of the OO development paradigm Highly interactive and human-intensive Results in the definition of objects and classes

Adapted from (Zenebe & Miao, 2001) HISTORY Introduced at OOPSLA in 1989 by Kent Beck and Ward Cunningham as an approach for teaching object-oriented design. In 1995,CRC cards are used extensively in teaching and exploring early design ideas. CRC cards have become increasingly popular in recent years. As formal methods proliferate, CRC cards have become, for some projects,the simple low-risk alternative for doing object-oriented development.

Adapted from (Zenebe & Miao, 2001) What’s a CRC Card? CRC stands for Class,Responsibility,and Collaboration. Class –A set of objects that share common structure and common behavior Super-class : a class from which another class inherits Subclass: a class that inherits from one or more classes Responsibility –Some behavior for which an object is held accountable. Collaboration –process whereby several objects cooperate to provide some higher-level behavior.

Adapted from (Zenebe & Miao, 2001) What’s a CRC CARD? (Cont.) An index card that is annotated in a group setting to represent a class of objects, its behavior, and its interactions. An informal approach to OO modeling Created through scenarios, based on the system requirements, that model the behavior of the system.

Adapted from (Zenebe & Miao, 2001) Sample CRC Card (Front & Back)

Adapted from (Zenebe & Miao, 2001) REQUIREMENTS Cards should be physical cards, not virtual cards. CASE tools for support of CRC cards are useful,but cannot replace the interaction that physical cards facilitate. 3x5 or 4x6 inch are the perfect size. But you can really use anything you want. ….Napkins??? Envelopes??? Refreshments (Optional)

Adapted from (Zenebe & Miao, 2001) THE CRC CARD SESSION The session includes a physical simulation of the system and execution of scenarios. Principles of successful session –All ideas are potential good ideas –Flexibility –Group Dynamic

Adapted from (Zenebe & Miao, 2001) BEFORE THE SESSION Forming the Group –The ideal size for the CRC card team: 5 or 6 people –The team should be composed of One or two domain experts two analysts an experienced OO designer one group’s leader/facilitator

Adapted from (Zenebe & Miao, 2001) The CRC Card Team Source:The CRC Card Book by Bellin et.al (1997)

Adapted from (Zenebe & Miao, 2001) DURING THE SESSION All the group members are responsible for holding, moving and annotating one or more cards as messages fly around the system. Group members create, supplement, stack, and wave cards during the walk-through of scenarios. A session scribe writes the scenarios.

Adapted from (Zenebe & Miao, 2001) PROCESS 1.Brainstorming –One useful tool is to find all of the nouns and verbs in the problem statement. 2. Class Identification –The list of classes will grow and then shrink as the group filters out the good ones. 3. Scenario execution (Role play) –The heart of the CRC card session

Adapted from (Zenebe & Miao, 2001) STRENGTHS The cards and the exercise are non-threatening & informal Provide a good environment for working and learning. Inexpensive, portable, flexible, and readily available Allow the participants to experience first hand how the system will work Useful tool for teaching people the object-oriented paradigm

Adapted from (Zenebe & Miao, 2001) LIMITATIONS Provide only limited help in the aspects of design. Do not have enough notational power to document all the necessary components of a system. Do not specify implementation specifics. Can not provide view of the states through which objects transition during their life cycle.

Adapted from (Zenebe & Miao, 2001) CRC GOOD PRACTICE Start with the simplest scenarios. Take the time to select meaningful class names. Take the time to write a description of the class. If in doubt, act it out! Lay out the cards on the table to get an intuitive feel for system structure. Be prepared to be flexible.

Adapted from (Zenebe & Miao, 2001) Case Example: A small technical library system for an R&D organization Requirement Statement Participants (Who? Why?) Creating Classes The CRC Card Sessions –scenario execution

Adapted from (Zenebe & Miao, 2001) Case example: Finding Classes Suggested Classes –Library, Librarian, User, Borrower, Article, Material, Item, Due Date, Fine, Lendable, Book, Video, and Journal Classes after filtering –Librarian, Lendable, Book, Video, Journal, Date, Borrower and User Assigning Cards –A CRC Card per Class, put name & description of the class

Adapted from (Zenebe & Miao, 2001) Scenario execution Scenario executions/Role Plays (For what?) –Filter and test identified classes –Identify additional classes –Identify responsibilities and collaborators can be derived from the requirements/use cases responsibilities that are "obvious" from the name of the class (be cautious, avoid extraneous responsibilities) –Filter and test responsibilities and collaborators –Attributes (only the primary ones)

Adapted from (Zenebe & Miao, 2001) Finding Responsibilities Things that the class has knowledge about, or things that the class can do with the knowledge it has Tips/Indicators –Verb phrases in the problem or use case –Ask what the class knows? What/how the class does ? –Ask what information must be stored about the class to make it unique?

Adapted from (Zenebe & Miao, 2001) Finding Collaborators A class asks another class when it –needs information that it does not have or –needs to modify information that it does not have Client - Server relationship Tips/Indicators –Ask what the class does not know and needs to know? And who can provide that

Adapted from (Zenebe & Miao, 2001) Case example: Scenario Execution Identify Scenarios (By domain experts) Main scenarios: check-out, return and search Start with the simple ones The first one always takes the longest Domain experts have high level of contribution during the early scenarios

Adapted from (Zenebe & Miao, 2001) Case example: Checkout Scenario Who should have the overall responsibilities for the task/check out? Librarian. What does the task entail? Shouldn't there be collaborations in the opposite direction? –Collaborations in CRC cards are one-way relationships from the client to the server (OO) Who should do the checking out of the Book? Librarian or Book itself? (Controversial)

Adapted from (Zenebe & Miao, 2001) Case example: Checkout Scenario Who should tell Borrower to update its knowledge about outstanding Book? Librarian or Book? Do we need a collaboration between Book and Borrower for the “know set of books” responsibility? –Collaborations are not usually needed for responsibilities that simply hold information, only for situations where an object actually sends a message to a Collaborator. –Borrower does not need Book's help to put a Book in a set.

Adapted from (Zenebe & Miao, 2001) CRC Cards after the first scenario run

Adapted from (Zenebe & Miao, 2001) Case example: Search Scenario "What happens when Ned comes to Library in search of a book entitled The Mythical Mammoth?" Discovery of new class: Collection class (Why?) –Book can’t look for itself –Collection looks over a set of Books to find the correct one When to end scenario execution? –When you have a stable model (does not cause new C or R to be added)

Adapted from (Zenebe & Miao, 2001) Grouping Cards  CRC cards on the table provides a visual representation of the emerging model  Classes with hierarchical (is-a) relationship  Class who collaborate heavily placed closer  Class included by other class (has-a relationship); e.g. Date in Lendable  Card clustering based on heavy usage or collaborations can provide visual clues to subsystems

Adapted from (Zenebe & Miao, 2001) Lower-Level Design CRC cards can be used to: –continually refine the classes –add implementation details –add classes not visible to user, but to designers and programmers –add classes needed for implementation, e.g. Database User Interface Error Handling

Adapted from (Zenebe & Miao, 2001) Lower-Level Design  Considering Design Constraints –Choice of supporting software components –Target environment and language –Performance requirements: response-time/ speed, expected availability, number of users –Errors/exceptional handling – Others: Security, Memory, etc.

Adapted from (Zenebe & Miao, 2001) “Design Classes” –represent mechanisms that support implementation of the problem –contain the data structures and operations used to implement the user-visible classes e.g. Array, List –interface classes for UI and DBM subsystems –classes to handle error conditions Lower-Level Design

Adapted from (Zenebe & Miao, 2001)  Important questions:  Who creates this object?  What happens when it is created and adopted?  What is the lifetime of the object vs. the life time of the information (persistence) held by an object? Attributes  Discovery of attributes that are necessary to support the task during examination of each responsibility  Identification of persistent attributes  Leads to a database design (database model) Lower-Level Design

Adapted from (Zenebe & Miao, 2001) Brainstorming any classes that come to mind based on design constraints such as –User Interface, Database access, error handling –User Interact class & DB interface Classes Scenario identification and execution Object creation scenarios Check-out Scenario Return Scenario Search Scenario Output: Design classes Case example: Lower-level Design

Adapted from (Zenebe & Miao, 2001) Principles:  make independent of specific hardware and software products  use specific class names instead of generic names such as GUI and DBMS  Work on both normal and exceptional scenarios Case example: Lower-level Design

Adapted from (Zenebe & Miao, 2001) New classes identified: –User interface: to get input from and output to user using GUI software classes –Database: To obtain and store Borrower objects and objects of the Lendable classes using DBMS software classes Case example: Lower-level Design

Adapted from (Zenebe & Miao, 2001) Deliverables Complete list of CRC Cards (class descriptions) List of scenarios recorded as suggested and executed Collaboration Diagram Application Problem Model

Adapted from (Zenebe & Miao, 2001) Advantages of CRC Cards Common project vocabulary Spreading domain knowledge Spreading OO design expertise Implicit design reviews Live prototyping Identifying holes in the requirements Limitation: Informal notation –“Designing is not the act of drawing a diagram” (Booch)