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.

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

Logon window<br />

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

#57. “Establish Window establishing responsibilities /<br />

or Report Attributes” Strategy what I know (model components)<br />

• For windows or reports, include: search fields, data entry fields, or both.<br />

For the logon window, you need these fields:<br />

– cashier number<br />

– cashier password<br />

– register number.<br />

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

#79. “Establish Window or Report establishing responsibilities /<br />

Object Connections” Strategy who I know (model components)<br />

• For a window or report, include an object connection (expressed as an attribute) to: the<br />

contents of the window, the objects it knows directly, to get the content it needs to do its<br />

job (note that a window can use those objects to get to other objects, indirectly).<br />

Here the objects a logon window needs to know include:<br />

– store (a collection of cashiers, with the ability to search for a cashier,<br />

given a cashier number)<br />

– cashier.<br />

One could model this “who I know” aspect with object connections. Yet object connections<br />

that span across object-model components are usually shown textually (so that<br />

they are easier to read and understand).<br />

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

Here’s how.<br />

For a window, the “what I do” are those the window-specific menu actions for that<br />

window.<br />

In addition, every window object knows how to display itself. And every window<br />

class knows how to create (and initialize) a new object in that class.<br />

Here, all you need to add is:<br />

– logon.<br />

Add the logon window and its responsibilities to the object model (Figure 1–45):

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

Saved successfully!

Ooh no, something went wrong!