Why Object-Oriented Programming Is Like Selling Cheese
IN THIS CHAPTER
The truth about object-oriented programming
Why a class is actually a Java type
An end to the mystery surrounding words like static
Andy's Cheese and Java Emporium carries fine cheeses and freshly brewed java from around the world (especially from Java in Indonesia). The Emporium is in Cheesetown, Pennsylvania, a neighborhood along the Edenville–Cheesetown Road in Franklin County.
The emporium sells cheese by the bag, each containing a certain variety, such as Cheddar, Swiss, Munster, or Limburger. Bags are labeled by weight and by the number of days the cheese was aged (admittedly, an approximation). Bags also carry the label Domestic or Imported, depending on the cheese's country of origin.
Before starting up the emporium, Andy had lots of possessions — material and otherwise. He had a family, a cat, a house, an abandoned restaurant property, a bunch of restaurant equipment, a checkered past, and a mountain of debt. But for the purpose of this narrative, Andy had only one thing: a form. Yes, Andy had developed a form for keeping track of his emporium's inventory. The form is shown in Figure 9-1