An informal, team oriented, OO design system

Slides:



Advertisements
Similar presentations
ACM/JETT Workshop - August 4-5, :Design of Classes using CRC cards.
Advertisements

CRC Cards (class-responsibility-collaborator)
IS514 Lecture Week 9 CRC Cards.
9/10/2004Use Case Workshop 1 CSC480 Software Engineering Workshop 1 Requirements Modeling.
Chapter 22 Object-Oriented Systems Analysis and Design and UML Systems Analysis and Design Kendall and Kendall Fifth Edition.
Object-Oriented Analysis
Objects First With Java A Practical Introduction Using BlueJ Designing object-oriented programs How to write code in a way that is easily understandable,
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.
Lecture 4 Class Responsibility Collaboration Cards
Object Oriented Analysis Process
CRC Card By: Yusmadi Yah Jusoh. What is CRC card?  A Class Responsibility Collaborator (CRC) model (Beck & Cunningham 1989; Wilkinson 1995; Ambler 1995)
Software development process: Problem decomposition and analysis.
Introductory case study. 2 The problem The most difficult part of any design project is understanding the task you are attempting You have been contacted.
Software Engineering Case Study Slide 1 Introductory case study.
Use Case Diagram : Library System
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.
The chapter will address the following questions:
Chapter 3 Object-Oriented Analysis of Library Management System(LMS)
Object Oriented Analysis By: Don Villanueva CS 524 Software Engineering I Fall I 2007 – Sheldon X. Liang, Ph. D.
Introduction to Sequence Diagrams
OHTO -99 SOFTWARE ENGINEERING LECTURE 5 Today: - An overview to OO Analysis and OO Design - Introduction of Assignment 2.
1 CMPT 275 Software Engineering Requirements Analysis Phase Requirements Analysis Activity (Identifying Objects, Scenarios) Janice Regan,
Objects First With Java A Practical Introduction Using BlueJ Designing applications 1.0.
Sept Ron McFadyen1 Section 10.1 Domain Models Domain Model: a visual representation of conceptual classes or real-world objects in a domain.
Coming up: Motivation1 Object-Oriented Analysis Using CRC Cards and Scenarios to Get Started on a Good Object- Oriented Design Slides from Jochen Rick.
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.
Lecture 3 Uses Cases Topics UML Use Cases pop quiz Readings: Chapter 3 January 24, 2008 CSCE 492 Software Engineering.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
Lecture 6: Structural Modeling
Chapter 12 Object Oriented Design.  Complements top-down design  Data-centered view of design  Reliable  Cost-effective.
Structural Modeling Chapter 7. Key Ideas A structural or conceptual model describes the structure of the data that supports the business processes in.
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.
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns Objects First with Java - A Practical.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
Designing applications Main concepts to be covered Discovering classes CRC cards Designing interfaces Patterns © 2017 Pearson Education, Inc. Hoboken,
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.
CRC Cards: Overview Emerson Murphy-Hill Creative Commons Attribution 4.0 License. Material Produced by NCSU Software Engineering Faculty.
Use Case Diagram Example
GRASP – Designing Objects with Responsibilities
Classes and their relationships
Business Process Modeling
Chapter 5: Structural Modeling
QlikView Licensing.
Start at 17th March 2012 end at 31th March 2012
Conducting the performance appraisal
Object-Oriented Analysis
Class Diagrams Oct 20, 2006.
Conducting the performance appraisal
CIS 336 strCompetitive Success/tutorialrank.com
CIS 336 str Education for Service-- tutorialrank.com.
Advanced Java Programming
What do you need to know about XP?
Object-Oriented Analysis
Object-Oriented Design
Object-Oriented Analysis
CRC Modeling (class-relationship-collaborator)
Chapter 10 Object States and The Statechart Diagram
Fundamentals of Data Structures
Cmdlets “Command-lets”
Copyright 2007 Oxford Consulting, Ltd
Algorithms and Problem Solving
To view, Enable Editing, select Slide Show, select From Beginning
4: Object-oriented Analysis & Design
Database Design Week 12.
Chapter 22 Object-Oriented Systems Analysis and Design and UML
Classes in Java Specifics for Java Copyright Curt Hill.
ITEC324 Principle of CS III
ITEC324 Principle of CS III
Presentation transcript:

An informal, team oriented, OO design system CRC Cards An informal, team oriented, OO design system Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Briefly Stands for Class, Responsibilities, and Collaboration Originally a teaching tool for objects Kent Beck and Ward Cunningham (1989) Now also an informal OO design technique Format is name at top Responsibilities on left Collaborating classes on right Super and sub classes are sometimes present Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Example Format Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Creating and Using Consider the scenario or user story Find classes within this scenario Find responsibilities and properties Define collaborators Move the cards around Simulate scenarios using the cards Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Find Classes An analysis task Identifies the building blocks of application Look for verbs and nouns A good rule of thumb is to look for the three to five main classes Later add classes concerning User interface Storage Or other helpers for the main classes Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Responsibilities What does the class do? These will become methods What does the class need to do this? These may become properties A responsibility for a class may fulfill the need of another class Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Find Collaborators A class often does not have sufficient information to fulfill its responsibilities It must then collaborate with other classes Collaboration will be in one of two forms: A request for information A request to perform a task Copyright © 2016 by Curt Hill

Identifying Collaborators Ask some questions Does the class have the ability to fulfill this responsibility? If not, then look for a class that either has the ability or a class which should have the ability This will show the need for new responsibilities in other classes or the need for new classes Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Collaborations Typically one way relationship A client server relationship Client class asks server class to: Perform a service Return some information Very seldom does the server turn around and ask the client something Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Move the Cards Around Place cards on a table Two cards that collaborate should be close together Is a and has a relationship should be close as well Two cards that don't collaborate should be placed far apart The more two cards collaborate, the closer they should be This makes it easier to understand the relationships between classes Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill The Session Start with a user story or scenario Use the cards to simulate how such a system would work This is a group activity There should be at least: A domain expert An experienced OO designer Developers A group leader Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Example Suppose we want to simulate a library We will have several scenarios: Checking out a book Returning a book Search for a book Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Finding classes A brainstorming exercise produced the following candidates: Library, Librarian, User, Borrower, Article, Material, Item, Due Date, Fine, Lendable, Book, Video and Journal These were refined into a smaller set: Librarian, User, Borrower, Lendable, Book, Video and Journal Next a card for each Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Scenario Questions Who should have the overall responsibility of check-out? Librarian What sub-tasks are part of this task? Checking the borrower Assigning a due date Moving the book from in to out status Connecting book with borrower Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Simulate The check out scenario is now simulated In the simulation responsibilities and collaborators are identified Assign attributes to fulfill the responsibilities In our example the following CRC cards were produced Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Results of CRC Cards Librarian Borrower Check out book for borrower Book Borrower Can borrow Know set of books Book Book Date Know if overdue Check out Calculate due date In or out Know due date Know borrower Date Compare dates Date Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Continuing After this scenario is done work through the next scenarios This may cause the cards (classes) to change or others to be added For example a search would require a set of books None of these classes could as yet handle this Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Good Practices Start with simplest scenarios Use meaningful class names You may be stuck with them Write a description of the class Usually after end of scenario Before that it may not last If in doubt, then act it out Be flexible Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Aftermath When we are done the information needs to be saved Complete set of cards The cards may be incomplete during simulations They should be fully completed now Optionally: Collaboration diagram Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Actual Classes Once the design is complete we can get to implementation New helper classes may be created at this point Design classes may be split into multiple classes Neither of these suggests that there were flaws in the design Copyright © 2016 by Curt Hill

Copyright © 2016 by Curt Hill Finally CRC cards are frequently used in the design phase This is a team activity Once the basic design is done implementation is comparatively easy Are we ready for an exercise? Finally for now Copyright © 2016 by Curt Hill