Page 168 - DCAP308_OBJECT_ORIENTED_ANALYSIS_AND_DESIGN
P. 168

Object Oriented Analysis and Design




                    Notes          13.2.4 Public Protocol Layer: External

                                   Items in this layer define the functionality of the object. Here are some things to keep in mind
                                   when designing class protocols: Good design allows for polymorphism. Not all protocol should
                                   be public; again apply design axioms and corollaries 1.




                                     Notes The following key questions must be answered: What are the class interfaces and
                                     protocols? What public (external) protocol will be used or what external messages must
                                     the system understand? What private or protected (internal) protocol will be used or what
                                     internal messages or messages from a subclass must the system understand?





                                      Task       Analyze the difference between protected protocol layer and public protocol
                                                 layer.


                                   13.2.5 Designing Classes: Refining Attributes

                                   Attributes identified in object-oriented analysis must be refined with an eye on implementation
                                   during this phase. In the analysis phase, the name of the attribute is enough. But in the design
                                   phase, detailed information must be added to the model.

                                   Attribute Types

                                   The types of attribute are explained as below:

                                   1.  Single value attributes: Single value attributes consists of just one value or state.


                                       Example: Name, address, salary.

                                   2.  Multiplicity or multi value attributes: Multiplicity or multi value attributes can have a
                                       collection of several values at a time.


                                       Example:
                                       (a)  To list the students who have scored above 710 marks.

                                       (b)  If we want to keep record of the names of people who have called a customer
                                            support line for help.

                                   3.  Instance connection: It is reference to another object. It offers the mapping required by an
                                       object to accomplish its responsibilities.


                                          Example: A person may have more than one account. A person has zero to many instance
                                   connections to Account(s). Similarly, an Account can be assigned to one or more person(s) (joint
                                   account). So an Account has zero to many instance connection to Person(s).







          162                               LOVELY PROFESSIONAL UNIVERSITY
   163   164   165   166   167   168   169   170   171   172   173