Connie’s Convenience Store (A Point-of-Sale Application)
GETTING STARTED
Here’s what you need to know before you plunge into the first application: What’s an object? What’s a class? An object is a person, place, or thing. A class is a description that applies to each of some number of objects.1 What are strategies and patterns, and why are they important? A strategy is some specific advice that you can use to achieve a specific objective. A pattern is a template of interacting objects, one that may be used again and again by analogy. The purpose of strategies and patterns is to reduce the amount of time it takes to become proficient at building object models.
IN THIS CHAPTER
In this chapter, you’ll learn and apply strategies and patterns that fit within these four major activities of building object models: – Identifying system purpose and features. – Selecting objects. – Establishing responsibilities. – Working out dynamics with scenarios. and objects form an outline, a skeleton, an organizational framework that is easy to understand and likely to be much more stable over time when compared to software organized around data, functions, or external interfaces. According to classification theory, “In apprehending the real world, [people] constantly employ three methods of organization, which pervade all of people’s thinking: (1) the differentiation of experience into particular objects and their attributes, e.g., when they distinguish between a tree and its size and spatial relations to other objects, (2) the distinction between whole objects and their component parts, e.g., when they contrast a tree with its component branches, and (3) the formation of and the distinction between different classes of objects, e.g., when they form the class of all trees and the class of all stones and distinguish between them” (“Classification Theory,” Encyclopaedia Britannica, 1986). 1
1Classes
2 Connie’s Convenience Store
Identifying System Purpose and Features