By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,918 Members | 2,240 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,918 IT Pros & Developers. It's quick & easy.

UML

P: n/a
Hi,

I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

thx

Chris

Jun 25 '07 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Chris wrote:
Hi,

I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

I think you are a little bit OT because these questions are indeed
related to UML rather than C++ or any other specific programming
language. Anyway, I think you are on the wrong way: UML is not a
programming language, and its purpose is not to represent the same
information the programming language do. So, the idea of describing the
entire behaviour of a class, or even an entire system, via UML diagrams
is in my opinion wrong. C class diagram is used in order to express
relationship between classes, and for a single class it's not useful at
all. To describe the dynamics of a process you need a dynamic
(behavioural) diagram, such activity/sequence/state-machine depending on
the focus of your description (logic of the operation; sequences of
actions and communications between different entities; and internal
state of the system respectively). Anyway, such diagrams are useful to
describe particular aspect of the system that need to be discussed /
studied / shared and for which the code is not enough.

Well, I hope this clarifies at least a lil'bit.

Regards,

Zeppe

Jun 25 '07 #2

P: n/a
On Jun 25, 1:00 pm, Zeppe
<zep_p@.remove.all.this.long.comment.yahoo.itwrote :
Chris wrote:
Hi,
I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

I think you are a little bit OT because these questions are indeed
related to UML rather than C++ or any other specific programming
language. Anyway, I think you are on the wrong way: UML is not a
programming language, and its purpose is not to represent the same
information the programming language do. So, the idea of describing the
entire behaviour of a class, or even an entire system, via UML diagrams
is in my opinion wrong. C class diagram is used in order to express
relationship between classes, and for a single class it's not useful at
all. To describe the dynamics of a process you need a dynamic
(behavioural) diagram, such activity/sequence/state-machine depending on
the focus of your description (logic of the operation; sequences of
actions and communications between different entities; and internal
state of the system respectively). Anyway, such diagrams are useful to
describe particular aspect of the system that need to be discussed /
studied / shared and for which the code is not enough.

Well, I hope this clarifies at least a lil'bit.

Regards,

Zeppe
Thx for your help Zeppe !
I know now how I will present it !

Regards

Chris

Jun 25 '07 #3

P: n/a
On Mon, 25 Jun 2007 10:14:31 -0000, Chris <ch****************@gmail.comwrote:
Hi,

I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?
Apart from class diagrams, state diagrams are the only part of UML I
find really useful. (Of course, UML didn't invent stats diagrams.)

State diagrams can be used for an isolated class -- if it has any
state that matters, that is.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Jun 25 '07 #4

P: n/a
Jorgen Grahn a écrit :
On Mon, 25 Jun 2007 10:14:31 -0000, Chris <ch****************@gmail.comwrote:
>I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

Apart from class diagrams, state diagrams are the only part of UML I
find really useful. (Of course, UML didn't invent stats diagrams.)
That depends at what level you act in the project. IMO data flow
diagrams make understanding, modification and specification a lot easier
throughout the life of the project and use cases help focusing on the
problem.

Michael
Jun 26 '07 #5

P: n/a
On Tue, 26 Jun 2007 09:13:24 +0200, Michael DOUBEZ <mi************@free.frwrote:
Jorgen Grahn a écrit :
>On Mon, 25 Jun 2007 10:14:31 -0000, Chris <ch****************@gmail.comwrote:
>>I have some questions about UML and C++;
I have written a class in C++, what is the best diagramm to represent
it ? I will explain the functions from this class...should I use an
activity diagramm for each function ??
A Class Diagramm for one class will not be usefull, I think ?

Apart from class diagrams, state diagrams are the only part of UML I
find really useful. (Of course, UML didn't invent stats diagrams.)

That depends at what level you act in the project. IMO data flow
diagrams make understanding, modification and specification a lot easier
throughout the life of the project
Never used data flow diagrams, sorry.
and use cases help focusing on the problem.
Oh yes. I forgot to mention use cases. Yes, I sometimes find them
useful, too.

What I've found less helpful is very detailed use cases, class
diagrams and sequence diagrams -- when they are created because
someone mandates it, rather than because they help understanding the
problem or the solution.

/Jorgen

--
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.dyndns.org R'lyeh wgah'nagl fhtagn!
Jun 26 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.