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.
78 Connie’s <strong>Convenience</strong> <strong>Store</strong> Working Out Human-Interaction Dynamics with Scenarios<br />
“Total the sale” scenario<br />
Here is the scenario view (1–53):<br />
SaleWindow<br />
total<br />
display<br />
total saleWindow.total<br />
display<br />
Receipt Sale<br />
addTotalLines<br />
addSubTotalLine<br />
addTaxLine<br />
addTotalLine<br />
addTotalLines<br />
addSubTotalLine<br />
[addTotalLines]<br />
addTaxLine<br />
[addTotalLines]<br />
addTotalLine<br />
calcSubtotal<br />
calcTax<br />
calcTotal<br />
calcSubtotal<br />
calcTax<br />
calcTotal<br />
Figure 1–53: The “total the sale” scenario view.<br />
Scenario: actual cashier totals a sale.<br />
Scenario constraint:<br />
0.1 seconds, 9 out of 10 times,<br />
1 second max.<br />
receipt.addTotalLines<br />
receipt.addSubTotalLine<br />
sale.calcSubTotal ( ; subtotal)<br />
receipt.addTaxLine<br />
sale.calcTax ( ; tax)<br />
receipt.addTotalLine<br />
sale.calcTotal ( ; total)<br />
saleWindow.display<br />
“Get payment by check” scenario<br />
It’s just about time for another scenario view.<br />
But first, note that you need to get the authorization done. Add an authorization<br />
system object to take care of it (more on this in the pages ahead).<br />
Meanwhile, here is the scenario view (Figure 1–54):