java extend and implements












-1















I'm confused about the following structure, is it correct ?



public interface personne {} personne{}
public abstract class personneImpl implements

public interface admin {};
public class adminImpl extend personneImpl implements admin {}


or should it be :



public class adminImpl extend personneImpl implements admin, personne {} 


Edit : the picture was just for simplification it's not a uml digram.










share|improve this question

























  • Since personneImpl already implements personne you do not have to add that again to adminImpl if it extends personneImpl

    – Mark
    Jan 2 at 17:02











  • Really? A picture of a hand-draw diagram on a napkin?

    – Geert Bellekens
    Jan 3 at 7:20
















-1















I'm confused about the following structure, is it correct ?



public interface personne {} personne{}
public abstract class personneImpl implements

public interface admin {};
public class adminImpl extend personneImpl implements admin {}


or should it be :



public class adminImpl extend personneImpl implements admin, personne {} 


Edit : the picture was just for simplification it's not a uml digram.










share|improve this question

























  • Since personneImpl already implements personne you do not have to add that again to adminImpl if it extends personneImpl

    – Mark
    Jan 2 at 17:02











  • Really? A picture of a hand-draw diagram on a napkin?

    – Geert Bellekens
    Jan 3 at 7:20














-1












-1








-1








I'm confused about the following structure, is it correct ?



public interface personne {} personne{}
public abstract class personneImpl implements

public interface admin {};
public class adminImpl extend personneImpl implements admin {}


or should it be :



public class adminImpl extend personneImpl implements admin, personne {} 


Edit : the picture was just for simplification it's not a uml digram.










share|improve this question
















I'm confused about the following structure, is it correct ?



public interface personne {} personne{}
public abstract class personneImpl implements

public interface admin {};
public class adminImpl extend personneImpl implements admin {}


or should it be :



public class adminImpl extend personneImpl implements admin, personne {} 


Edit : the picture was just for simplification it's not a uml digram.







java






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 4 at 17:48







Jahir Nabil

















asked Jan 2 at 16:59









Jahir NabilJahir Nabil

2719




2719













  • Since personneImpl already implements personne you do not have to add that again to adminImpl if it extends personneImpl

    – Mark
    Jan 2 at 17:02











  • Really? A picture of a hand-draw diagram on a napkin?

    – Geert Bellekens
    Jan 3 at 7:20



















  • Since personneImpl already implements personne you do not have to add that again to adminImpl if it extends personneImpl

    – Mark
    Jan 2 at 17:02











  • Really? A picture of a hand-draw diagram on a napkin?

    – Geert Bellekens
    Jan 3 at 7:20

















Since personneImpl already implements personne you do not have to add that again to adminImpl if it extends personneImpl

– Mark
Jan 2 at 17:02





Since personneImpl already implements personne you do not have to add that again to adminImpl if it extends personneImpl

– Mark
Jan 2 at 17:02













Really? A picture of a hand-draw diagram on a napkin?

– Geert Bellekens
Jan 3 at 7:20





Really? A picture of a hand-draw diagram on a napkin?

– Geert Bellekens
Jan 3 at 7:20












2 Answers
2






active

oldest

votes


















1














No, that's not correct. An extends relation is used between stereotype and metatype in a profile definition. See p. 262 of the UML 2.5 specs. This connector shall have a solid triangle at the end. What can be seen from your drawing it is an association with a name Extends. That would result in an attribute within PersonneImp. An <<extends>> stereotyped connector is used only between UseCases.



What you probably intend to show (with respect to the 2nd code example) is a Generalization which is the equivalent to a Java extend keyword. That would have a hollow triangle where the arrow is now and have no label.






share|improve this answer































    1














    To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have



    enter image description here






    share|improve this answer


























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54010275%2fjava-extend-and-implements%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      1














      No, that's not correct. An extends relation is used between stereotype and metatype in a profile definition. See p. 262 of the UML 2.5 specs. This connector shall have a solid triangle at the end. What can be seen from your drawing it is an association with a name Extends. That would result in an attribute within PersonneImp. An <<extends>> stereotyped connector is used only between UseCases.



      What you probably intend to show (with respect to the 2nd code example) is a Generalization which is the equivalent to a Java extend keyword. That would have a hollow triangle where the arrow is now and have no label.






      share|improve this answer




























        1














        No, that's not correct. An extends relation is used between stereotype and metatype in a profile definition. See p. 262 of the UML 2.5 specs. This connector shall have a solid triangle at the end. What can be seen from your drawing it is an association with a name Extends. That would result in an attribute within PersonneImp. An <<extends>> stereotyped connector is used only between UseCases.



        What you probably intend to show (with respect to the 2nd code example) is a Generalization which is the equivalent to a Java extend keyword. That would have a hollow triangle where the arrow is now and have no label.






        share|improve this answer


























          1












          1








          1







          No, that's not correct. An extends relation is used between stereotype and metatype in a profile definition. See p. 262 of the UML 2.5 specs. This connector shall have a solid triangle at the end. What can be seen from your drawing it is an association with a name Extends. That would result in an attribute within PersonneImp. An <<extends>> stereotyped connector is used only between UseCases.



          What you probably intend to show (with respect to the 2nd code example) is a Generalization which is the equivalent to a Java extend keyword. That would have a hollow triangle where the arrow is now and have no label.






          share|improve this answer













          No, that's not correct. An extends relation is used between stereotype and metatype in a profile definition. See p. 262 of the UML 2.5 specs. This connector shall have a solid triangle at the end. What can be seen from your drawing it is an association with a name Extends. That would result in an attribute within PersonneImp. An <<extends>> stereotyped connector is used only between UseCases.



          What you probably intend to show (with respect to the 2nd code example) is a Generalization which is the equivalent to a Java extend keyword. That would have a hollow triangle where the arrow is now and have no label.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Jan 2 at 17:07









          Thomas KilianThomas Kilian

          23.9k63864




          23.9k63864

























              1














              To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have



              enter image description here






              share|improve this answer






























                1














                To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have



                enter image description here






                share|improve this answer




























                  1












                  1








                  1







                  To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have



                  enter image description here






                  share|improve this answer















                  To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have



                  enter image description here







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Jan 2 at 20:42

























                  answered Jan 2 at 19:03









                  brunobruno

                  12.1k31326




                  12.1k31326






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54010275%2fjava-extend-and-implements%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      MongoDB - Not Authorized To Execute Command

                      How to fix TextFormField cause rebuild widget in Flutter

                      Npm cannot find a required file even through it is in the searched directory