Page 536 -
P. 536

Chapter 13 Building Information Systems 535


               An object combines data and the specific processes that operate on those data.
               Data encapsulated in an object can be accessed and modified only by the
                 operations, or methods, associated with that object. Instead of passing data to
               procedures, programs send a message for an object to perform an operation that
               is already embedded in it. The system is modeled as a collection of objects and
               the relationships among them. Because processing logic resides within objects
               rather than in separate software programs, objects must collaborate with each
               other to make the system work.
                  Object-oriented modeling is based on the concepts of class and inheritance.
               Objects belonging to a certain class, or general categories of similar objects,
               have the features of that class. Classes of objects in turn can inherit all the
               structure and behaviors of a more general class and then add variables and
               behaviors unique to each object. New classes of objects are created by  choosing
               an existing class and specifying how the new class differs from the existing
               class, instead of starting from scratch each time.
                  We can see how class and inheritance work in Figure 13.8, which illustrates
               the relationships among classes concerning employees and how they are paid.
               Employee is the common ancestor, or superclass, for the other three classes.
               Salaried, Hourly, and Temporary are subclasses of Employee. The class name is
               in the top compartment, the attributes for each class are in the middle  portion
               of each box, and the list of operations is in the bottom portion of each box.
               The features that are shared by all employees (id, name, address, date hired,
               position, and pay) are stored in the Employee superclass, whereas each subclass
               stores features that are specific to that particular type of employee. Specific to
               hourly employees, for example, are their hourly rates and overtime rates. A
               solid line from the subclass to the superclass is a generalization path showing
               that the subclasses Salaried, Hourly, and Temporary have common features
               that can be generalized into the superclass Employee.
                  Object-oriented development is more iterative and incremental than
                 traditional structured development. During analysis, systems builders document


                     FIGURE 13.8  CLASS AND INHERITANCE






























               This figure illustrates how classes inherit the common features of their superclass.








   MIS_13_Ch_13 global.indd   535                                                                             1/17/2013   2:31:23 PM
   531   532   533   534   535   536   537   538   539   540   541