Connie's Convenience Store - About Peter Coad
Connie's Convenience Store - About Peter Coad
Connie's Convenience Store - About Peter Coad
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
66 Connie’s <strong>Convenience</strong> <strong>Store</strong> Selecting Human-Interaction objects<br />
Wow!<br />
By now, you know how to read a scenario view.<br />
This scenario view expands upon these two lines from the previous rounds:<br />
The “calcTotal” service invokes the “calcTax” service.<br />
The “calcTax” service returns “totalTax.”<br />
Here’s what happens now:<br />
Within a sale object, the “calcTotal” service invokes the “calcTax” service.<br />
The “calcTax” service sends a “getTaxCat” message to a store object.<br />
A store is told to get its tax categories.<br />
The “getTaxCat” service returns a collection of tax categories.<br />
The “calcTax” service sends a “howMuchTaxInCat” message to a sale line<br />
item object (and it may do this a number of times), giving it a tax<br />
category.<br />
A sale line item is told to calculate its tax for a given category.<br />
The “howMuchInTaxCat” service sends a “howMuchInTaxCat”<br />
message to an item object, giving it a tax category.<br />
An item object is told to calculate its amount within a tax category.<br />
The “howMuchInTaxCat” service invokes the “getPriceForDate”<br />
service, giving it a date.<br />
The “getPriceForDate” service returns a price.<br />
The “howMuchInTaxCat” service returns an amount.<br />
The “howMuchInTaxCat” service returns a tax amount.<br />
The “getTaxRate” service returns a tax rate for that category.<br />
The “calcTax” service returns “totalTax.”<br />
Yes!<br />
Scenarios are vitally important for building effective object models. You work out<br />
system dynamics. And you find additional objects and responsibilities along the way.<br />
What a deal!<br />
SELECTING HUMAN-INTERACTION OBJECTS<br />
Finally, you are ready to check out some human-interaction objects.<br />
Actually, you might choose to find human-interaction objects; then you could work<br />
on problem-domain objects next. Or you might work back and forth, finding objects<br />
and dropping them into the HI or PD “buckets.” Anyway, at this point it’s time to check<br />
out some human-interaction objects. In today’s systems, human-interaction objects are<br />
most often windows or reports.<br />
Select windows<br />
What windows should you consider?