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 Shopping Customer Cart Item Confirm items ✓ Confirm items ✓ Provide payment and address Process sale ✓ Validate payment ✓ Confirm order ✓ Provide order number ✓ Payment Order Email Check order status ✓ Provide payment and Send email Set payment Send order details email ✓ 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 Collaborato and Shopping Cart r Address detail Responsibility Collaborato Item Validate Shoppingr Responsibility EmailCollaborato Cart payment Display Totals Customer r Item ResponsibilityOrderCollaborator Item Shopping Send email Order Responsibility CartCollaborato Order r 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 Collaborato and Shopping Cart r Address detail Responsibility Collaborato Item Validate Shoppingr Responsibility EmailCollaborato Cart payment Display Totals Customer r Item ResponsibilityOrderCollaborator Item Shopping Send email Order Responsibility CartCollaborato Order r 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