
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















(^) Play the role of…
(^) In scenarios within the domain (^) To facilitate understanding and communication (between the development team & developer/ user) (^) To identify class responsibilities (methods) (^) To identify collaborations (messages and contracts)
(^) Class name (^) type of thing/ object classifier/ concept (^) Responsibilities (^) What this class is contracted to do (methods) (^) Collaborators (^) which other classes this class interacts with associations <
(^) On back (^) Actions/Methods (^) Parameters/ Prerequisites (Constructor) (^) Attributes/ knowledge (local) (^) Results (return value(s)) (^) Visibility (+ - # ~) (^) Class Attributes & visibility
(^) A small well defined set of requirements and constraints (^) A scenario
Attributes Method signatures Class attribs:
(^) Role play to develop/clarify the roles and responsibilities (^) Simple scenarios first leave the ‘what ifs’ to later (^) Initiator? (^) Respondent (Collaborator)? (^) Responses/ Results? (^) Actions? (^) It may be the responsibility of another class (^) Messages? (^) Target, Name, Parameters, return value (of an action/method) (^) Expand/ correct/ add appropriate cards (^) Class name, Responsibilities/ Actions/ Methods, prerequisites…
(^) Do not discuss/criticise in brainstorming sessions just record. (^) Initial card filling is just to get the role playing started. The main input comes from the role play. Initially the cards could be blank except for the class name. (^) In role play (^) Single task! (^) Only one ‘class’ at a time has the floor (^) though many may be active (^) Do not respond to inaccurate/incomplete messages (^) The domain expert arbitrates on responsibilities
Role play Method 1 Class card holders place all cards in front of them on table. 2 Place ‘post it note’ with words ‘stack empty finish’ face up on table (the stack). 3 Decide on Initiating action/ message and responsible class (& instance). 4 Write Class name, instance id IID & message on a post it note, place on stack. 5 Identify Current Class (CC). CC is holder of class identified on top of stack. If ‘stack empty finish’ is visible: then finish. 6 If not standing CC stands (S/he is an active instance/ object of that class), if already holding a card with that IID, uses it, else copies appropriate (class) card and adds IID 7 CC does action(s) necessary to satisfy responsibility A. If appropriate actions missing then create new ones (include responsibility allocation) B. If action requires alteration of attribute values/state (note: consider multi tasking/ threading implications) CC records current new value(s) on card. C. If action requires collaboration of another class, resume at 3. D. If action requires another action by this instance, resume at 4. E. If responsibility complete for current message pick up top ‘post it’. (if last message and instance for this class: sit down, class is inactive), resume at 5 NOTE: Facilitators ensure classes have attributes and methods to perform actions. Domain experts rule on knowledge, ability and method allocation. Observers spot errors. Developers do as little as is reasonable (Shirk responsibility)
(^) Observers ensure classes have knowledge/ ability to perform actions (^) Those standing represent active classes those seated are inactive classes. (^) Of the active classes only one at a time will actually be doing the actions needed to satisfy its responsibility (single task). (^) The first time an instance of a class is created it may be necessary to assume some initial values or perform some preparatory actions, these should be recorded. (^) Initially things will be missing/wrong create/correct as you go along. (^) There are some differences between this and the original by Kent Beck and Ward Cunningham.
(^) Therefore the detail in the previous slide would be too great
(^) Possibly from scratch (^) In the form of diagrams
(^) Other scenarios require new role-plays
(^) can invalidate earlier ones (^) requiring a replay of them
(^) A customer approaches the outlet and requests details about a mix. The outlet staff provide promo material and a list of available songs and videos. The customer makes a selection gives it to the staff for checking. The staff check (on NetSales website) the availability and run times to ascertain if it will fit on the media and give a price. They also report on unused space (waste). This is repeated until the customer is satisfied with the content and places an order. The staff the ask for a title(s) and cover graphic. The customer supplies their own graphic (JPEG) or selects one from the outlets set. The staff indicate the processing time (about 2 working hours) and when the customer should return. The audio and or video staff, download the content, prepare a blank CD/DVD and burn the data onto it. The Graphic staff, prepare the art work and print the labels and packaging. The sales staff, package the disks artwork and promo material ready for the customer.
(^) Customer, Staff, NetSales web site, (^) A customer approaches the outlet and requests details about a mix. The outlet staff provide promo material and a list of available songs and videos. The customer makes a selection gives it to the staff for checking. The staff check (on NetSales website) the availability and run times to ascertain if it will fit on the media and give a price. They also report on unused space (waste). This is repeated until the customer is satisfied with the content and places an order. The staff the ask for a title(s) and cover graphic. The customer supplies their own graphic (JPEG) or selects one from the outlets set. The staff indicate the processing time (about 2 working hours) and when the customer should return. The audio and or video staff, download the content, prepare a blank CD/DVD and burn the data onto it. The Graphic staff, prepare the art work and print the labels and packaging. The sales staff, package the disks, artwork and promo material ready for the customer.
(e.g. customer purchase of a mix –assuming some role play-) MakeSelection -------Extension------- Unsure of details AcceptWaste GetTitle PlaceOrder RequestMixDetails SupplyGraphic -------Extension------- HasOwn SetReturnTime SupplyOwnGraphic GetGraphicFromSet c:Customer «extend» {Unsure of details} «extend» {wasted Space} «extend» {HasOwn} (Is .pic |.gif |.jpg) «extend» {not HasOwn} Negotiate content -------Extension------- Wasted Space «include»