Page 34 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 34

Object Oriented Analysis and Design




                    Notes          Communication by Message Passing

                                   You will agree that a single object alone is generally not very useful. Objects usually appear as
                                   a component of a larger program or a system. Through the interaction of these objects,
                                   functionality of systems is achieved. Software objects interact and communicate with each other
                                   by message passing to each other. When object X wants object Y to perform one of methods of
                                   object Y, object X sends a message to object Y. Message passing provide two significant benefits:
                                       An object’s characteristics are expressed through its methods, so message passing supports
                                       all possible interactions between objects.

                                       It closes the gap between objects. Objects do not need to be in the same process, or even on
                                       the same machine, to send and receive messages back and forth to each other.




                                      Task       Illustrate attributes and operations with example.


                                   Self Assessment

                                   Fill in the blanks:
                                   1.  A class describes a collection of similar .......................
                                   2.  ....................... are named slots for data values that belong to the class.

                                   3.  ....................... represent services that an object can request to affect the behavior of the
                                       object or the system itself.
                                   4.  The notation for an object is the same in basic form as that for a .......................

                                   5.  Software objects interact and communicate with each other by ....................... to each other.
                                   3.2 Link and Association Concepts


                                   Links and associations are the basic means used for establishing relationships among objects
                                   and classes of the system.

                                   3.2.1  General Concepts


                                   A link is a physical or conceptual connection between objects, for example, a student, Ravi study
                                   in IGNOU. Mathematically, you can define a link as a tuple that is an ordered list of objects.
                                   Further, a link is also defined as an instance of an association. In other words you can say that an
                                   association is a group of links with a common structure and common meanings, for example, a
                                   student study in a university. All the links in an association connects objects from the same
                                   classes. A link is used to show a relationship between two (or more) objects.
                                   Association and classes are similar in the sense that classes describe objects, and association
                                   describes links.


                                          Example: In Figure 3.4 shows us how we can show the association between Student and
                                   University.








          28                                LOVELY PROFESSIONAL UNIVERSITY
   29   30   31   32   33   34   35   36   37   38   39