Software System EngineeringSlide 2Slide 3Existing CRC Cards (1)Existing CRC Cards (2)Major Problems with Existing CRC CardsProposed CRC Cards (1)CRC Cards (2)Slide 9CRC Cards (3)CRC Cards (4)CRC Cards (5)Discussion Questions© M.E. Fayad 2000 -- 2006SJSU -- CmpESoftware System Engineering Dr. M.E. Fayad, ProfessorComputer Engineering Department, Room #283I College of EngineeringSan José State UniversityOne Washington SquareSan José, CA 95192-0180 http://www.engr.sjsu.edu/~fayad© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S2 CRC Cards2Lesson 3-4:CRC Cards© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S3 CRC Cards Lesson ObjectivesObjectives3 Understand the existing CRC Cards Understand the problems with existing CRC Cards Understand and use my CRC Cards Learn how to create a CRC Cards© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S4 CRC CardsCRC stands for Class, Responsibilities, CollaborationsBasic Ideas–Create a card for each class –Assign responsibilities and attributes to each card –Identify collaborations between cards –Simulate design scenarios between sets of cards4Existing CRC Cards (1)© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S5 CRC Cards5Existing CRC Cards (2)© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S6 CRC CardsMacho ClassDuplicate FunctionalityDifficulty in Defining Responsibilities No Clear Role is Defined Hard to Map CRC Cards to Class Diagram6Major Problems with Existing CRC Cards© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S7 CRC Cards7Proposed CRC Cards (1) Class (Role)Responsibility Collaboration Client Server© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S8 CRC Cards8CRC Cards (2)• General – Each class is described on a separate 3X5 or 4X6 card• The cards are known as CRC cards; they have 3 sections:– Class– Responsibilities– Collaborations© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S9 CRC Cards9CRC Cards (2)Class Name X (Role)ResponsibilityCollaborationClient Server1. Specify One2. Unique Responsibility3. Within contextCollaboratorsServices or Interfaces that are provided by the named X class© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S10 CRC Cards10CRC Cards (3)ATM (Automatic Teller)ResponsibilityCollaborationAccess & modify account balance Account Balance Inquiry Deposit Transaction Funds Transfer Withdrawal TransactionRole nameCollaboratorClient Server© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S11 CRC CardsPrepare a CRC card for each identified class–Define class role–Provide one unique responsibility–Identify collaborators (Clients and Services)11CRC Cards (4)ResponsibilityProvide manipulationClient Servercriteria to evaluate device - Manipulator - runScripts()performance.- Evaluator - modifyScripts()- Inquiry - addScripts()- Presentation - dynamicallyQuery()- update()Analyst (Modifier)Collabortation© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S12 CRC Cards12CRC Cards (5)ResponsibilityFlag values that fallClient Serveroutside acceptance limits - Analyst - compare()- Local Container - flag()- Test SuiteEvaluator (Evaluate Data)CollabortationResponsibilityManipulates data to Client Serverenable measurement - Analyst - calculate()porcess- Local Container- MetricManipulator (Manipulate Data)CollabortationResponsibilityProcess requestsClient Serversubmitted by user - User - select()- Local Containrer - process()- Presentation - sort()- group()- access()Inquiry (Process Query)Collabortation© M.E. Fayad 2000 -- 2006SJSU – CmpE M.E. Fayad L3-4-S13 CRC CardsWhat are the good, bad, and ugly about CRC cards?Propose a process of how to use the CRC cards T/F–CRC stands for Common Responsible Class–CRC cards contains many responsibilities per class.–In the CRC cards, collaborators don’t have any relationship with the CRC’s named class.Define: –CRC, responsibilities, and collaborators13 Discussion
View Full Document