Connie's Convenience Store - About Peter Coad
Connie's Convenience Store - About Peter Coad
Connie's Convenience Store - About Peter Coad
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
72 Connie’s <strong>Convenience</strong> <strong>Store</strong> Working Out Human-Interaction Dynamics with Scenarios<br />
Responsibilities for reports<br />
Receipt<br />
Establish responsibilities: “what I know.”<br />
Here’s how.<br />
For a report, the “what I know” consists of:<br />
– values, ones that it eventually sends as message arguments.<br />
The “who I know” consists of:<br />
– objects that I can send messages to.<br />
Hence, for a receipt, you need this attribute:<br />
– sale.<br />
Establish responsibilities: “what I do.”<br />
Here’s how.<br />
For a window, the “what I do” are those the report-specific output actions for a window.<br />
Here, it’s:<br />
– generate<br />
which internally invokes:<br />
– add heading lines<br />
– add line item line<br />
– add subtotal line<br />
– add tax line<br />
– add total line<br />
– add payment line.<br />
Add receipt and its responsibilities to the object model (Figure 1–47):<br />
sale<br />
Receipt<br />
generate<br />
addHeadingLines<br />
addPaymentLine<br />
addLineItemLine<br />
addSubtotalLine<br />
addTaxLine<br />
addTotalLine<br />
Figure 1–47: Receipt: “what I know; who I know; what I do.”<br />
WORKING OUT HUMAN-INTERACTION DYNAMICS WITH SCENARIOS<br />
Find meaningful human interaction scenarios<br />
To begin with: where can you find ideas for meaningful scenarios?<br />
Here’s how. Human-interaction scenarios begin with some human interaction.