Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Simple question :)  (Read 3696 times)

0 Members and 1 Guest are viewing this topic.

technology_forever

    Topic Starter


    Rookie

  • where there's a will, there's a way
    Simple question :)
    « on: December 14, 2008, 03:48:24 AM »

    Hello all ,

    could anybody help me understanding this

    "The Law of Demeter for functions requires that a method M of an object O may only invoke the methods of the following kinds of objects:
     1. O itself
     2. M's parameters
    3. any objects created/instantiated within M
    4. O's direct component objects

    simple example for each case ( case 1 , 2, 3 and 4 ) would do

    thank you :)

    technology_forever

      Topic Starter


      Rookie

    • where there's a will, there's a way
      Re: Simple question :)
      « Reply #1 on: December 14, 2008, 04:15:04 AM »
      this paragraph follows the above :

      "The basic idea is to avoid invoking methods of a member object that is returned by another method. When you do this, you make structural assumptions about the container object that may be likely to change. The container may later need to be modified to contain a different number of the contained objects, or it may end up being changed to contain another object which contains the original component object. If the "returned" object isn't a subpart of the object whose method was invoked, nor of some other object, then it typically is not a violation of LoD to invoke a method of the returned object (particularly if the object was created by the invoking method)."

      could you please help me understand this too...
      your  help is highly appreciated :)

      Dias de verano

      • Guest
      Re: Simple question :)
      « Reply #2 on: December 14, 2008, 05:12:35 AM »
      WE don't do people's Comp Sci homework for them.

      technology_forever

        Topic Starter


        Rookie

      • where there's a will, there's a way
        Re: Simple question :)
        « Reply #3 on: December 14, 2008, 05:18:13 AM »


        im a math major gradute, doing my master in computer science,
        this is NOT a homwork..im doing a reseach on the SoC ( seperation of concerns ) and came across LoD (law of demeter ) ..if you dont want to help..thats ok..just dont give me excuses like "we dont do homework' !

        plus .think about it! what kind of a silly homework would my question be !

        Dias de verano

        • Guest
        Re: Simple question :)
        « Reply #4 on: December 14, 2008, 05:44:43 AM »
        This is not a masters level tutorial site. Read some of the other posts to get an idea of what type of question stands a good chance of being answered.

        And leave the attitude at the door.

        David Bock's "paper boy example" seems to be the sort of thing you are looking for however.



        technology_forever

          Topic Starter


          Rookie

        • where there's a will, there's a way
          Re: Simple question :)
          « Reply #5 on: December 14, 2008, 05:47:58 AM »
          lol...the question i asked it NOT even  A MASTER LEVEL DEAR... i dont wana LEAVE MY ATTITUDE AT THE DOOR...I WANA TAKE IT WITH ME WHEREVER I GO :p DO ME A FAVOR AND "KICK ME" OUT OF THIS FORUM ! IT SUCKS LOL..CANT EVEN ANSWER A SIMPLE QUESTION ! YOU GUYS ARE STUPID...
          GUESS THIS WILL BE MY LAST MESSAGE HERE..SO LET ME SAY "YOU SUCKKKKK,,:p"
          NO HARD FEELINGS...EIHHH ?:p///CIAOO...:p

          Carbon Dudeoxide

          • Global Moderator

          • Mastermind
          • Thanked: 169
            • Yes
            • Yes
            • Yes
          • Certifications: List
          • Experience: Guru
          • OS: Mac OS
          Re: Simple question :)
          « Reply #6 on: December 14, 2008, 05:57:54 AM »
          With that attitude, you won't get any help.

          Quote
          GUESS THIS WILL BE MY LAST MESSAGE HERE
          Fair enough.

          I'm sure someone like you can Google.

          Topic Closed.

          If the OP or anyone has any inquiries regarding this, please PM me or one of the moderators.

          CBMatt

          • Mod & Malware Specialist


          • Prodigy

          • Sad and lonely...and loving every minute of it.
          • Thanked: 167
            • Yes
          • Experience: Experienced
          • OS: Windows 7
          Re: Simple question :)
          « Reply #7 on: December 15, 2008, 02:36:47 AM »
          Being the simple question that it is, I'm sure you'll have no trouble finding the answer yourself.
          Quote
          An undefined problem has an infinite number of solutions.
          —Robert A. Humphrey