zen & the art of oriented / objects college of alameda copyright © 2006 patrick mcdermott...
TRANSCRIPT
Zen & The Artof Oriented / Objects
College of AlamedaCopyright © 2006 Patrick McDermott
With a tip of the hat to:Herrigel, Eugen, R.F.C. Hull (translator from German),Zen in the Art of Archery,New York: Vintage Books (0-375-70509-0), 1953, 1989(Zen in der Kunst des Bogenschiessens, 1948)
René Magritte (1898-1967)The Prince of ObjectsLe Prince des objets1927
Data Processing
ProcessData
Tear down this Wall!!!
Name is “Pat”Balance is $110Payment is $50
Take Pat’s Balance;Subtract the Payment;Make that the Balance;
Classes & Objects
OBJECT: A discrete entity with a well-defined boundary and identity that encapsulates state and behavior; an instanceof a class. Rumbaugh [3 Amigos], Reference, p. 360.
CLASS: The descriptor for a set of objectsthat share the same attributes, operations, methods, relationships and behavior. A classrepresents a concept within the system being Modeled. Rumbaugh [3 Amigos], Reference, p. 185.
Separate the Essence from the Instance.
Class
A class is a category of Things. An object is one of those things. A instantiation of a class.
EncapsulationInheritance $$
PolymorphismNameAddressTelephoneCreditRating Taxonomy is a taxing task:
Is a Grad student an employee? Is Pluto a Planet? Is Bill Gates human?
“Class” is perhapsBest defined by Examples…
• Tangible• Intangible• Conceptual
– Cost Center, Account
• People• Places• Things• Events• Roles• Organizations
• Collections of Objects
• Interface– Form or Dialog
• Infrastructure– Date, Money,
Address• Persistence:
Database• Control• Reference Lists• Other Systems• Process
– Currency Format?
They’re Everywhere!There must be a Class if
… there’s a form… there’s a file… there’s a number… there are multiple copies… It’s Important• NOTE--
– Sections and boxes on Forms– The name might not be obvious
Responsibilities• Obligation or Contract• Personification Helps
Know Things– Invoice: Know the Customer
Do Things– Invoice: Compute Total
Get Organized– Abstraction