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.
22 Connie’s <strong>Convenience</strong> <strong>Store</strong> Applying Patterns: Select and Organize Problem-Domain Objects<br />
#4. “Place-Transaction” Pattern transaction patterns<br />
number<br />
name<br />
address<br />
aboutMe<br />
Place<br />
howMany<br />
howMuch<br />
rankTransactions<br />
calcOverTransactions<br />
ansOverTransactions<br />
• Typical object interactions<br />
howMany —> calcForMe calcOverTransactions —> calcForMe<br />
howMuch —> calcForMe rankTransactions —> rateMe<br />
• Examples<br />
Place: airport, assembly-line, airport, bank, clinic, depot, garage, geographic entity,<br />
hangar, hospital, manufacturing site, plant, region, sales outlet, service center,<br />
shelf, station, store, warehouse, zone.<br />
Transaction: agreement, assignment, authorization, contract, delivery, deposit,<br />
incident, inquiry, order, payment, problem, report, purchase, refund, registration,<br />
rental, reservation, sale, shift, shipment, subscription, time charge, title,<br />
withdrawal.<br />
• Combinations<br />
participant-transaction; specific item–transaction; transaction–transaction line item;<br />
transaction–subsequent transaction. Also, using “place” as a container: containercontent;<br />
container–container line item.<br />
Connect the players (Figure 1–12):<br />
<strong>Store</strong> Sale<br />
n 1<br />
n 1<br />
Figure 1–12: <strong>Store</strong>-sale.<br />
Transaction<br />
number<br />
date<br />
time<br />
status<br />
aboutMe<br />
calcForMe<br />
rateMe