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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Establishing Human Interaction Responsiblities Connie’s <strong>Convenience</strong> <strong>Store</strong> 71<br />

LogonWindow<br />

cashierNumber<br />

cashierPassword<br />

cashier<br />

store<br />

registerNumber<br />

logon<br />

Figure 1– 45: Logon window: “what I know; who I know; what I do.”<br />

Sale window<br />

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

Consider a sale window.<br />

What does it know?<br />

It knows values, ones that it eventually sends as message arguments:<br />

– upc<br />

– session.<br />

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

Who does a sale window know?<br />

Here’s the scoop: objects, ones that it eventually sends messages to.<br />

A sale window needs to send messages to:<br />

– sale<br />

– sale line item<br />

– item<br />

– payments.<br />

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

What does a sale window do?<br />

Here are the services:<br />

– commit<br />

– cancel.<br />

Add sale window responsibilities to the model (Figure 1–46):<br />

SaleWindow<br />

upc<br />

session<br />

sale<br />

saleLineItem<br />

item<br />

payments<br />

commit<br />

cancel<br />

Figure 1–46: Sale window: “what I know; who I know; what I do.”<br />

For additional windows, follow the same basic strategies, again and again.

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

Saved successfully!

Ooh no, something went wrong!