if you See Larman diagrams, you will note that he has used message create() to instantiate a new object in the interaction diagram , actually every language has its own way of creating a new object, (e.g java instantiate with new operator) & UML can not provide any language dependent notation of creating new object therefore there is no notion of constroctor in UML(correct me UML gurus if i am mistaken)
Joined: Jul 02, 2001
thanks for the input Deepak! it's all coming back now.. i guess you're right! i remember using create in place of Constructors before and yep we got it from a book by Craig Larman. thanks again Deepak!
Deepak, That's correct!create() is a language-independent way to create a new instance of a class in UML.The message should be passed actually be passed to a class, but UML allows it to be passed to an instance. The create() of UML gets translated to language-dependent syntax of OO language(for example, new operator in Java) -- Sandeep [This message has been edited by Desai Sandeep (edited July 11, 2001).]