Page 221 -
P. 221

206     PASTOR,  MOLINA,  AND  IBORRA
                    Figure 11.1  Class Vehicle


                                                     Vehicle

                                            «Id» PlateNumber: String
                                            CreationDate: Date
                                            Make: String
                                            Model: String
                                            Fuel: String
                                            Kilometers: Real
                                            Status: String
                                            Notes: String

                                            «new» Create()
                                            «destroy» Delete()
                                            Rent()
                                            Return()




                      The semantics of a transaction is defined via a formula that states:
                      •  the set of services that comprise the transaction,
                      •  the initialization of each argument of each of these services, and
                      •  (optionally) Boolean conditions that must hold for each of these services to execute.
                      The ability to define the functionality of atomic services (events), coupled with the ability to
                    compose an arbitrary number of services into another (molecular) service, is a clear contribution
                    of the OO-Method and allows the functionality of services (the equivalent to UML operations)
                    of classes to be fully specified.
                      The functionality of services can be further constrained by defining preconditions, well-formed
                    Boolean formulas equivalent to precondition constraints in UML. Also, integrity constraints (class
                    invariants) can be defined to prevent the occurrence of services from leaving objects of the system
                    in an invalid state.
                      As stated above, generalization and association/aggregation relationships can be defined be-
                    tween classes. Generalization relationship specification deals with the inheritance specification.
                    Both generalization and its inverse, specialization, can be specified. A child class can be seen as
                    a role that is activated when a given event or a class condition is fulfilled and that incorporates
                    the corresponding set of new properties characterizing the role. It can be left out when the speci-
                    fied event occurs or when a leaving condition is satisfied. In any case, signature compatibility is
                    required to assure consistency between parent and child classes.
                      Additionally, association/aggregation relationships allow well-known binary relationships
                    between classes to be declared, including cardinality, the static or dynamic aspect of the relation-
                    ship, potential identity dependencies, and a stronger form of aggregation if composition is present.
                    Figure 11.2 depicts sample association and generalization relationships.
   216   217   218   219   220   221   222   223   224   225   226