0% found this document useful (0 votes)
53 views20 pages

CSE327 Lecture 4 MMA1

The document discusses identifying classes and responsibilities from use case scenarios using CRC (Class Responsibility Collaborator) cards. It provides an example use case scenario for an online shopping system. Key classes identified include Customer, ShoppingCart, Item, Payment, Order, and Email. CRC cards are then created for each class, listing its responsibilities and collaborators to fulfill those responsibilities. CRC cards are explained as a brainstorming tool used in object-oriented design to model system behavior and interactions between classes.

Uploaded by

mdy850.my
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views20 pages

CSE327 Lecture 4 MMA1

The document discusses identifying classes and responsibilities from use case scenarios using CRC (Class Responsibility Collaborator) cards. It provides an example use case scenario for an online shopping system. Key classes identified include Customer, ShoppingCart, Item, Payment, Order, and Email. CRC cards are then created for each class, listing its responsibilities and collaborators to fulfill those responsibilities. CRC cards are explained as a brainstorming tool used in object-oriented design to model system behavior and interactions between classes.

Uploaded by

mdy850.my
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

Software

Engineering
(CSE 327)
Lecture 4
(CRC Cards)
Identifying Classes

• Perform a “grammatical parse” on a


description of the system to be built.
• Classes are determined by underlining each
noun or noun clause and entering it in a
simple list –these are candidate classes.
• Synonyms should be noted.
Identifying Classes
• Use Case Scenario
Customer confirms items in shopping cart.
Customer provides payment and address to
process sale. System validates payment and
responds by confirming order and provides
order number that Customer can use to check
on order status. System will send Customer a
copy of order details by email.
Identifying Classes
• Use Case Scenario
Customer confirms items in shopping cart.
Customer provides payment and address to
process sale. System validates payment and
responds by confirming order and provides
order number that Customer can use to check
on order status. System will send Customer a
copy of order details by email.
Identifying Classes
• Use Case Scenario
Customer confirms items in shopping cart.
Customer provides payment and address to
process sale. System validates payment and
responds by confirming order and provides
order number that Customer can use to check
on order status. System will send Customer a
copy of order details by email.
Identifying Classes
• Noun List
Customer Order Copy
Item Order Number
Shopping cart Order Status
Payment Order Details
Address Email
Sale System
Identifying Class Relationships
uses contains
Customer Shopping Cart 1
Item
*

places
multiplicity

Payment Order Email


paid by

Conceptual Object Model


Identifying Responsibilities
• Use Case Scenario
Customer confirms items in shopping cart. Customer
provides payment and address to process sale.
System validates payment and responds by
confirming order and provides order number that
Customer can use to check on order status. System
will send Customer a copy of order details by email.
Identifying Responsibilities
• Use Case Scenario
Customer confirms items in shopping cart. Customer
provides payment and address to process sale.
System validates payment and responds by
confirming order and provides order number that
Customer can use to check on order status. System
will send Customer a copy of order details by email.
Identifying Responsibilities
• Use Case Scenario
Customer confirms items in shopping cart. Customer
provides payment and address to process sale.
System validates payment and responds by
confirming order and provides order number that
Customer can use to check on order status. System
will send Customer a copy of order details by email.
Confirm items Confirm order
Provide payment and address Provide order number
Process sale Check order status
Validate payment Send order details email
Assigning Responsibilities
Customer
Shopping
Cart
Item Confirm items ✓
Confirm items ✓
Provide payment and address
Process sale ✓
Validate payment ✓
Confirm order ✓
Provide order number ✓
Email

Payment Order
Check order status
Send order details email ✓
Provide payment and Send email
Set payment
Address detail
and
Address detail Process order
Validate payment Confirm order
Provide order number
Check order status
Create order confirmation email
CRC Cards
• An index card that is use to represent
– A class
– the responsibilities of classes and
– the interaction between the classes.
• An informal approach to object oriented modeling.
• The cards are created through scenarios, based on the
system requirements, that model the behavior of the
system.
• The name CRC comes from Class, Responsibilities, and
Collaborators which the creators found to be the
essential dimensions of object oriented modeling.
Finding Collaborators
• A class often does not have sufficient information to fulfill its
responsibilities. Therefore, it must collaborate (work) with
other classes to get the job done.
• Collaboration will be in one of two forms: a request for
information or a request to perform a task.
• To identify the collaborators of a class for each responsibility
ask yourself "does the class have the ability to fulfill this
responsibility?". If not then look for a class that either has the
ability to fulfill the missing functionality or the class which
should fulfill it.
• In doing so we will often discover the need for new
responsibilities in other classes and maybe even the need for
a new class or two.
CRC Cards
• Class Responsibility Collaborator (CRC cards) are a
brainstorming tool used in the design of object-
oriented software.
CRC Cards
Payment
Responsibility Collaborator
Set payment and Order
Address detail
Validate payment
Payment
Responsibility Collaborator
Customer
Set payment
Responsibility Order
Collaborator
and Shopping Cart
Address detail
Responsibility Shopping
Collaborator
Item
Validate Cart
Display Totals Customer
Responsibility Email
Collaborator
payment Item
Shopping
Item
ResponsibilityOrderCollaborator
Cart
Send email Order
ResponsibilityOrder
Collaborator
Process order Customer
Confirm order Item
Get order Payment
number
Get status Email
Create order
confirmation
email
Payment
Responsibility Collaborator
Customer
Set payment
Responsibility Order
Collaborator
and Shopping Cart
Address detail
Responsibility Shopping
Collaborator
Item
Validate Cart
Display Totals Customer
Responsibility Email
Collaborator
payment Item
Shopping
Item
ResponsibilityOrderCollaborator
Cart
Send email Order
ResponsibilityOrder
Collaborator
Process order Customer
Confirm order Item
Get order Payment
number
Create order Email
confirmation
email
Why uses CRC cards?
• They are portable. No computers are required
so they can be used anywhere.
• The allow the participants to experience first
hand how the system will work. No computer
tool can replace the interaction that happens by
physically picking up the cards and playing the
roll of that object.
• The are a useful tool for teaching people the
object-oriented paradigm.
POS Tagger

https://parts-of-speech.info/

You might also like