Showing posts with label C-plus-plus. Show all posts
Showing posts with label C-plus-plus. Show all posts

Wednesday, 6 August 2014

Differentiate Aggregation and containment?


            Aggregation is the relationship between the whole and a part. We can add/subtract some   properties in the part (slave) side. It won't affect the whole part.
            Best example is Car, which contains the wheels and some extra parts. Even though the parts are not there we can call it as car.

            But, in the case of containment the whole part is affected when the part within that got affected. The human body is an apt example for this relationship. When the whole body dies the parts (heart etc) are died.

Can link and Association applied interchangeably?


            No, You cannot apply the link and Association interchangeably. Since link is used represent the relationship between the two objects.
            But Association is used represent the relationship between the two classes.
            link ::                student:Abhilash         course:MCA
            Association::    student                  course

                        

what is meant by "method-wars"?



            Before 1994 there were different methodologies like Rumbaugh, Booch, Jacobson, Meyer etc who followed their own notations to model the systems. The developers were in a dilemma to choose the method which best accomplishes their needs.     This particular span was called as "method-wars"

Whether unified method and unified modeling language are same or different?


      Unified method is convergence of the Rumbaugh and Booch.

      Unified modeling lang. is the fusion of Rumbaugh, Booch and Jacobson as well as Betrand Meyer (whose contribution is "sequence diagram"). Its' the superset of all the methodologies.

Who were the three famous amigos and what was their contribution to the object community?


            The Three amigos namely,
Ø  James Rumbaugh (OMT): A veteran in analysis who came up with an idea about the   objects and their Relationships (in particular Associations).
Ø  Grady Booch: A veteran in design who came up with an idea about partitioning of systems into subsystems.
     
Ø  Ivar Jacobson (Objectory): The father of USECASES, who described about the user and system interaction.


Differentiate the class representation of Booch, Rumbaugh and UML?


            If you look at the class representaiton of Rumbaugh and UML, It is some what similar and both are very easy to draw.
      Representation:   OMT                                                               UML.
      Diagram:



     

            Booch: In this method classes are represented as "Clouds" which are not very easy to draw as for as the developer's view is concern.

What is an USECASE? Why it is needed?


            A Use Case is a description of a set of sequence of actions that a system performs that yields an observable result of value to a particular action.

In SSAD process <=> In OOAD USECASE. It is represented elliptically.

Who is an Actor?


An Actor is someone or something that must interact with the system.In addition to that   an Actor initiates the process(that is USECASE).

            It is represented as a stickman like this.


What is guard condition?


            Guard condition is one, which acts as a firewall. The access from a particular object can be made only when the particular condition is met.
            For Example,
                        customer      check customer number   ATM.
Here the object on the customer accesses the ATM facility only when the guard condition is met.

Differentiate the following notations?


                         I:          :obj1               :obj2
    
                        II:        :obj1               :obj2



            In the above representation I, obj1 sends message to obj2. But in the case of II the data is transferred from obj1 to obj2.

USECASE is an implementation independent notation. How will the designer give the implementation details of a particular USECASE to the programmer?


This can be accomplished by specifying the relationship called "refinement” which  talks about the two different abstraction of the same thing.
            Or example,
           
            calculate pay                 calculate
                                               
                                                class1   class2 class3

            

Suppose a class acts an Actor in the problem domain, how to represent it in the static model?


            In this scenario you can use “stereotype”. Since stereotype is just a string that gives extra semantic to the particular entity/model element. It is given with in the <<  >>.

                        class A
                        << Actor>>
                        attributes
           
                        methods.


Why does the function arguments are called as "signatures"?


The arguments distinguish functions with the same name (functional polymorphism). The name alone does not necessarily identify a unique function.  However, the name and its arguments (signatures) will uniquely identify a function.
            In real life we see suppose, in class there are two guys with same name, but they can be     easily identified by their signatures. The same concept is applied here.
            ex:
                        class person
                        {
                  public:
                                    char getsex();
                                    void setsex(char);
                                    void setsex(int);
                        };

            In the above example we see that there is a function setsex() with same name but with different signature.