Object-Oriented Analysis and the Domain Model

Chapter 1 • Introduction 11 I friend have coding engages in program constructs a new is • The program was flaky • Ice cube is cold We can decompose arbitrary sentences into propositions. For example, the sentence “My friend is coding a new program” can be written as the following propositions Proposition Concept Relation Concept 1. I have friend 2. friend engages in coding 3. coding constructs a program 4. program is new How to construct a concept map? A strategy I found useful starts with listing all the concepts that you can identify in a given problem domain. Next, create the table as above, initially leaving the “Relation” column empty. Then come up with or consult a domain expert for the relations among pairs of concepts. Notice that, unlike the simple case shown in the table above, in general case some concepts may be related to several other concepts. Finally, drawing the concept map is easy when the table is completed. We will learn more about propositions and Boolean algebra in Chapter 3 below. Concept maps are designed for capturing static knowledge and relationships, not sequential procedures. I will use concepts maps in describing the case study problems and they can be a helpful tool is software engineering in general. But obviously we need other types of diagrammatic representations and our main tool will be UML.

1.3.1 Case Study 1: From Home Access Control to Adaptive Homes

Figure 1-4 illustrates our case-study system that is used in the rest of the text to illustrate the software engineering methods. In a basic version, the system offers house access control. The system could be required to authenticate “Are you who you claim to be?” and validate “Are you supposed to be entering this building?” people attempting to enter a building. Along with controlling the locks, the system also turns on the light when you unlock the door. As typical of most software engineering projects, a seemingly innocuous problem actually hides many complexities, which will be revealed as we progress through the development cycle. Figure 1-4 already indicates some of those, since houses usually have more than one lock. Shown are two locks, but there could be additional ones, say for a garage entrance, etc. Additional features, such as intrusion detection further complicate the system. For example, the house could provide you with an email report on security status while you are away on vacation. Police will also attend when they receive notification from a central monitoring station that a monitored system has been activated. False alarms require at least two officers to check on and this is a waste of police resources. Many cities now fine residents for excessive false alarms. Here are some additional features to think about. You could program the system to use timers to turn lights, televisions and sound systems on and off at different times to give your home a “lived-in look” when you are away. Install motion-detecting outdoor floodlights around your