20.02.2013 Views

Connie's Convenience Store - About Peter Coad

Connie's Convenience Store - About Peter Coad

Connie's Convenience Store - About Peter Coad

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

30 Connie’s <strong>Convenience</strong> <strong>Store</strong> Establishing Responsibilities for Problem-Domain Objects<br />

Establish responsibilities: “who I know.”<br />

Who does a person object know?<br />

#72. “Establish Objects I Know” Strategy establishing responsibilities /<br />

who I know (fundamentals)<br />

• This is an aspect of a software object coming to life: “I know other objects, ones that are<br />

related to the actual object that I’m an abstraction of.”<br />

• Select connecting objects to satisfy these two purposes:<br />

To directly know “to whom to send a message” (within one or more scenarios).<br />

To answer a query about objects that are directly related to it.<br />

Here’s some specific help.<br />

#74. “Establish Actor and Participant establishing responsibilities /<br />

Object Connections” Strategy who I know (pattern players)<br />

• For an actor, include an object connection to: its participants.<br />

• For a participant, include an object connection to: its actor, its transactions.<br />

A person object knows its participant objects. And each participant object knows its<br />

corresponding person object (Figure 1–20):<br />

name<br />

address<br />

phone<br />

Establish responsibilities: “what I do.”<br />

Person Cashier<br />

1 1<br />

Figure 1–20: Person: “who I know.”<br />

#89. “Basic Services” Strategy establishing responsibilities /<br />

what I do (fundamentals)<br />

• The basic service, done by all, are not shown in an object model, except within specific<br />

scenario views that might use them.<br />

• The basics: get, set; add (a connecting object), remove (a connecting object); create<br />

(something a class does) and initialize, delete.<br />

• Note: attributes are private, by convention. In scenarios, use “get ” and<br />

“set ” services to access attribute values.<br />

• The basic DM services—for data management objects—are: search, load, and save.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!