triphis Posted May 23, 2007 Share Posted May 23, 2007 I'm sorry, I checked all the forums and didn't know where to ask this @_@ I really wanted to ask on phpfreaks.com though because everyone here answers 1) fast, and 2) correctly So I'm ACTUALLY working on a Java assignment... but the language shouldn't matter here... UML should be the same for all OO languages right? I am just wondering, what do I put as the return type for constructors (in the method/3rd box of a class diagram)? Constructors technically "return" an object of type CLASS (whatever it is constructing for) right? So do I put... + thisConstructor() : CLASS or should it be VOID? **OR** do I not even include constructors in UML diagrams? Thanks so much to anyone who can help me out Link to comment https://forums.phpfreaks.com/topic/52588-simple-oo-uml-help/ Share on other sites More sharing options...
448191 Posted May 23, 2007 Share Posted May 23, 2007 <<constructor>> SomeClass() : void is the common thing to do I believe. I personally would simply omit the return type, because the constructor stereotype already makes it irrelevant. As much with UML, it's mostly preference though. <<constructor>> SomeClass() : SomeClass would be acceptable too IMO. Link to comment https://forums.phpfreaks.com/topic/52588-simple-oo-uml-help/#findComment-259676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.