Page 166 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 166

Object Oriented Analysis and Design




                    Notes          Self Assessment

                                   Fill in the blanks:
                                   1.  An ................. is a fundamental truth that always is observed to be valid and for which
                                       there is no counter example or exception.

                                   2.  A ................. is a proposition that may not be self-evident but can be proved from accepted
                                       axioms.
                                   3.  A ................. is a proposition that follows from an axiom or another proposition that has
                                       been proven.
                                   4.  ................. is a measure of the strength of association established by a connection from one
                                       object or software component to another.
                                   5.  ................. is a binary relationship.
                                   6.  ................. coupling involves the amount and complexity of messages between components.
                                   7.  ................. coupling is a form of coupling between super and sub classes.

                                   8.  ................. means that all the class’s methods and attributes must be highly cohesive, meaning
                                       to be used by internal methods or derived classes’ methods.

                                   13.2 Concept of Class Design


                                   Object-oriented design requires taking the object identified during object-oriented analysis and
                                   designing classes to represent them.
                                   As a class designer, we have to know the specifics of the class we are designing and also we
                                   should be aware of how that class interacts with other classes.

                                   13.2.1 Object-oriented Design Philosophy

                                       Here one has to think in terms of classes. As new facts are acquired, we relate them to
                                       existing structures in our environment (model).
                                       After enough new facts are acquired about a certain area, we create new structures to
                                       accommodate the greater level of detail in our knowledge.

                                       The important activity in designing an application is coming up with a set of classes that
                                       work together to provide the functionality we desire.

                                       If we design the classes with reusability in mind, we will gain a lot of productivity and
                                       reduce the time for developing new applications.

                                   13.2.2 Class Visibility: Designing well-defined Public, Private and
                                          Protected Protocols

                                   In designing methods or attributes for classes, we are confronted with two problems. One is the
                                   protocol or interface to the class operations and its visibility and the other is how it is implemented.
                                   The class’s protocol or the messages that a class understands, can be hidden from other objects
                                   (private protocol) or made available to other objects (public protocol).
                                   Public protocols define the functionality and external messages of an object, while private
                                   protocols define the implementation of an object. It is important in object-oriented design to





          160                               LOVELY PROFESSIONAL UNIVERSITY
   161   162   163   164   165   166   167   168   169   170   171