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.

Slides:



Advertisements
Similar presentations
Design, prototyping and construction
Advertisements

Chapter 11 Designing the User Interface
OBJECT-ORIENTED Design
© 2010 Bennett, McRobb and Farmer1 Use Case Description Supplementary material to support Bennett, McRobb and Farmer: Object Oriented Systems Analysis.
UCD Yong Choi BPA. What is UCD? A use case is a set of scenarios that describing an interaction between a user and a system. – What a system does…rather.
OOAD Using the UML - Use-Case Analysis, v 4.2 Copyright  Rational Software, all rights reserved 1/18 Use Case Analysis – continued Control Classes.
Elliott Bays, Taylor Ivy, Mark Sarosky, David Martin, Ovidiu Ravasan.
Introduction To System Analysis and Design
1 Chapter 6 Object-Oriented Software Design and Implementation.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
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
Essentials of interaction diagrams Lecture Outline Collaborations Interaction on collaboration diagrams Sequence diagrams Messages from an object.
COMP106 Assignment 2 PROPOSAL 20. Proposed metaphor For the new system I propose to implement an interface which much more closely imitates a library.
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,
Use Case Analysis – continued
Exploring the Basics of Windows XP
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:
*Object-Oriented Design (Schach Chap 14)
Introduction To System Analysis and design
OO Analysis and Design CMPS OOA/OOD Cursory explanation of OOP emphasizes ▫ Syntax  classes, inheritance, message passing, virtual, static Most.
Object Oriented Software Development
CMIS 470 Structured Systems Design
SOFTWARE ENGINEERING BIT-8 APRIL, 16,2008 Introduction to UML.
Introduction to Sequence Diagrams
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
CSSE 501 Object-Oriented Development. Today…  Chapter 3: Object-Oriented Design.
Introduction To System Analysis and Design
10/12/ Recall The Team Skills 1. Analyzing the Problem (with 5 steps) 2. Understanding User and Stakeholder Needs 1. Interviews & questionnaires.
Chapter 6 Use Cases. Use Cases: –Text stories Some “actor” using system to achieve a goal –Used to discover and record requirements –Serve as input to.
Software Engineering Chapter 7 Fall Capturing the Requirements as Use Cases Capturing the Requirements as Use Cases By using use cases analysts.
Introduction of Geoprocessing Topic 7a 4/10/2007.
1 Analysis Extracting from Use Cases to Create Diagrams.
Copyright 2002 Prentice-Hall, Inc. Chapter 2 Object-Oriented Analysis and Design Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey.
CSC 395 – Software Engineering Lecture 13: Object-Oriented Analysis –or– Let the Pain Begin (At Least I’m Honest!)
CSSE 501 Object-Oriented Development. Today…  Chapter 3: Object-Oriented Design.
Systems Analysis and Design in a Changing World, 3rd Edition
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 8: Analysis Modeling Software Engineering: A Practitioner’s Approach, 6/e Chapter.
CSCI 383 Object-Oriented Programming & Design Lecture 8 Martin van Bommel.
Lecture 3 : Object Oriented Design (chapter 3. of Timothy Budd’s “Intro to OOP” book) Acknowledgement : courtesy of Prof. Timothy Budd lecture slides.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 14 Slide 1 Object-oriented Design.
UML Use Case Diagramming Guidelines. What is UML? The Unified Modeling Language (UML) is a standard language for specifying, visualizing, constructing,
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
A Use Case Primer 1. The Benefits of Use Cases  Compared to traditional methods, use cases are easy to write and to read.  Use cases force the developers.
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Interaction Diagrams Interaction Diagrams allow the designer to show how groups of objects collaborate in some behavior. –Interaction Diagrams will show.
Use Case Driven Analysis Requirements Use Case Use Case Description System Sequence Diagram Chapter 5.
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
ITEC324 Principle of CS III Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
An Introduction to Forms. The Major Steps of a MicroSoft Access Database  Tables  Queries  Forms  Macros  Reports  Modules On our road map, we are.
Week 04 Object Oriented Analysis and Designing. What is a model? A model is quicker and easier to build A model can be used in simulations, to learn more.
CSCI-383 Object-Oriented Programming & Design Lecture 7.
CMSC 345 Fall 2000 OO Design. Characteristics of OOD Objects are abstractions of real-world or system entities and manage themselves Objects are independent.
Lecture 3 : Object Oriented Design (chapter 3
Introduction of Geoprocessing Lecture 9 3/24/2008.
CSCI 383 Object-Oriented Programming & Design Lecture 7 Martin van Bommel.
High Level Design Use Case Textual Analysis SE-2030 Dr. Mark L. Hornick 1.
Chapter 2 (Horstmann’s Book) – Part 1 The Object-Oriented Design Process Hwajung Lee.
OCR A Level F453: High level languages Programming techniques a. identify a variety of programming paradigms (low-level, object- oriented,
Recall The Team Skills Analyzing the Problem (with 5 steps)
Unified Modeling Language
Objectives State the reasons for the complexity involved in the development of software Define the following terms Objects Classes Messages Methods Explain.
Chapter 11 Following the Trail; Examining Execution Sequences
Analysis models and design models
Algorithms and Problem Solving
ITEC324 Principle of CS III
Presentation transcript:

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 and interact, the inner workings of objects (attributes and operations), and communication mechanisms (messages) that allow them to work together Object-Oriented Analysis begins with a description of use-cases. Class-Responsibility-Collaborator (CRC) modeling transforms the information contained in use-cases into a representation of classes and their collaborations with other classes. The characteristics of classes are then modeled using UML

CRC Cards

Responsibility What the class knows or does Student: have names, address, phone number, enroll courses

An Example, the IIKH Imagine you are the chief software architect in a major computing firm One day your boss rushes into your office with a specification for the next PC-based product. It is drawn on the back of a used dinner napkin, in handwriting that appears to be your bosss Briefly, the Intelligent Interactive Kitchen Helper will replace the box of index cards of recipes in the average kitchen

Your Job Your job is to develop the software that will implement the IIKH

Abilities of the IIKH Here are some of the things a user can do with the IIKH [identified as a result of a use-case analysis]: –Browse a database of recipes –Add a new recipe to the database –Edit or annotate an existing recipe –Plan a meal consisting of several courses –Scale a recipe for some number of users –Plan a longer period, say a week –Generate a grocery list that includes all the items in all the menus for a period

Scenarios A scenario is an instance of a use case –It expresses a specific occurrence of the use case A specific actor... At a specific time... With specific data Can be part of the Description field of a use case

CRC Cards Responsibilities –Express responsibilities as short verb phrases containing active rather than passive verbs –Define what should be done, not how to do it (declarative) –Include only essential information, not a great deal of detail Collaborators –A collaborator for a class is another class with which the first class collaborates to carry out its responsibilities –The sender of a message usually is not one of the collaborators of the receiver

CRC Cards Identify an initial set of classes. Create one card for each Identify an initial set of responsibilities and collaborators for each card. This may lead to the identification of other classes Spread the cards out on a desk or attach them to a wall For a group project, assign one or more cards to each person in the group Run through usage scenarios; as the flow of control passes to a class, bring that card to a prominent spot As the scenarios are played out, gaps in the design are filled in. This is a form of iterative refinement

The Greeter Let us return to the development of the IIKH. The first class your team defines is the Greeter. When the application is started, the Greeter puts an informative and friendly welcome window (the greeting) on the screen

The Greeter Offer the user the choice of several different actions –Casually browse the database of recipes –Add a new recipe –Edit or annotate a recipe –Review a plan for several meals –Create a plan of meals Many of the details concerning exactly how this is to be done can be ignored for the moment

A Component, The Greeter CRC card?

The Recipe Database Ignoring the planning of meals for the moment, your team elects to next explore the recipe database –Must Maintain the Database of recipes –Must Allow the user to browse the database –Must permit the user to edit or annotate an existing recipe –Must permit the user to add a new recipe

Postponing Decisions Many decisions, such as the method of browsing, can be ignored for the moment, as they are entirely encapsulated within the recipe database, and do not effect other components –Scroll bars and windows? –A virtual book with thumb-holes and flipping pages? –Keywords and phrases? Only need to note that somehow the user can manipulate the database to select a specific recipe

The Who/What Cycle As we walk through scenarios, we go through cycles of identifying a what, followed by a who –What action needs to be performed at this moment, –Who is the class charged with performing the action Every what must have a who, otherwise it simply will not happen. Sometimes the who might not be obvious at first, i.e., who should be in charge of editing a recipe?

Responsibilities of a Recipe We make the recipe itself into an active data structure. It maintains information, but also performs tasks –Maintains the list of ingredients and transformation algorithm –Must know how to edit these data values –Must know how to interactively display itself on the output device –Must know how to print itself –We will add other actions later (ability to scale itself, produce integrate ingredients into a grocery list, and so on)

The Planner Returning to the greeter, we start a different scenario. This leads to the description of the Planner –Permits the user to select a sequence of dates for planning –Permits the user to edit an existing plan –Associates with Date object

The Date The Date class holds a sequence of meals for an individual date –User can edit specific meals –User can annotate information about dates (Bob's Birthday, Christmas Dinner, and so on) –Can print out grocery list for entire set of meals

The Meal The Meal class holds information about a single meal –Allows user to interact with the recipe database to select individual recipes for meals –User sets number of people to be present at meal, recipes are automatically scaled –Can produce grocery list for entire meal, by combining grocery lists from individual scaled recipes