java extend and implements
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
add a comment |
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
SincepersonneImpl
already implementspersonne
you do not have to add that again toadminImpl
if it extendspersonneImpl
– Mark
Jan 2 at 17:02
Really? A picture of a hand-draw diagram on a napkin?
– Geert Bellekens
Jan 3 at 7:20
add a comment |
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
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
java
edited Jan 4 at 17:48
Jahir Nabil
asked Jan 2 at 16:59


Jahir NabilJahir Nabil
2719
2719
SincepersonneImpl
already implementspersonne
you do not have to add that again toadminImpl
if it extendspersonneImpl
– Mark
Jan 2 at 17:02
Really? A picture of a hand-draw diagram on a napkin?
– Geert Bellekens
Jan 3 at 7:20
add a comment |
SincepersonneImpl
already implementspersonne
you do not have to add that again toadminImpl
if it extendspersonneImpl
– 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
add a comment |
2 Answers
2
active
oldest
votes
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.
add a comment |
To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
add a comment |
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.
add a comment |
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.
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.
answered Jan 2 at 17:07


Thomas KilianThomas Kilian
23.9k63864
23.9k63864
add a comment |
add a comment |
To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have
add a comment |
To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have
add a comment |
To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have
To complete the previous answer if we have "class A extend B implement I {...}" in Java, in the diagram we have
edited Jan 2 at 20:42
answered Jan 2 at 19:03


brunobruno
12.1k31326
12.1k31326
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
Since
personneImpl
already implementspersonne
you do not have to add that again toadminImpl
if it extendspersonneImpl
– Mark
Jan 2 at 17:02
Really? A picture of a hand-draw diagram on a napkin?
– Geert Bellekens
Jan 3 at 7:20