Re: How to represent a constructor in UML?
On 2007-08-19 02:09, rcdailey@gmail.com wrote:
On Aug 18, 6:55 pm, "Victor Bazarov" <v.Abaza...@comAcast.net> wrote:
rcdai...@gmail.com wrote:
On Aug 18, 5:16 pm, "mrdoommas...@gmail.com" <rcdai...@gmail.com>
wrote:
Hi,
How do I represent a constructor in UML?
Say I have a class named Foo. Would it look like so:
+Foo( some_val : int )
Is the above correct? Thanks for reading.
One more thing... How do I represent const parameter values? For
example:
void Bar( const std::string& file );
In UML, would this be:
+Bar( file : const std::string& )
Is the above correct? Thanks for your help.
Consider posting to comp.object. They are more likely involved
with UML than folks here. I am yet to meet somebody who uses
UML while programming in C++.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Thanks; I did a search for "UML" in the newsgroup list but I was
unable to find related groups. I will use the group you suggested.
Thanks again!
PS: Just curious, why do most C++ programmers not use UML? I have a co-
worker that swears by it. In fact, he believes in UML so much that he
doesn't believe you can create a reliable set of C++ interfaces
without it. What do C++ programmers do during the design phase-
interface implementation?
UML is a programming language of its own, it does not try to model some
other language (or, you can say that it tries to model them all) which
means that you can hardly ever get a one to one mapping between the UML
model and the actual code, at least not if you want good code.
Because of this I think UML is useful when creating abstract designs,
and to discuss ideas. But it is not good as a specification of the
actual code, so if it's going to be used you have to take care not
spending to much time perfecting the UML design, since it probably will
not hold in the end.
--
Erik Wikstr?m