IBM Rational Rose: Is it possible to model class's operations and integrate it for code generation?

420 Views Asked by At

I'm using IBM Rational Rose, but I'm not sure if I'm able to model/design the methods/procedures which are known as "operations" within a class onto "UML User Class Diagram". Is there any way to model the algorithm or the code of 'operations' (i.e something like flowchart) via the software? If so, is there any possibility to get the methods design auto-implementation integrated via code generation in order to define them within a java source file?

2

There are 2 best solutions below

6
qwerty_so On BEST ANSWER

Another way to model behavior is to use StateMachine, Constraints, Sequence and Timing diagrams. Of course, you can simply write Notes describing behavior in plain words.

7
granier On

You can use activity diagram, activity diagrams are near a flow chart.

See rsa activity diagram

On your activity diagram, you create a partition and you can link your partition to you operation. Then you create callOperation action which can be linked to method call.

I create a class diagram with 4 class Class1, Class2, Class3, Class4, each one containing a method operationx.

And here is a simple example modeling operation1. The important point is that the partition named Operation1 is linked in the UML model to Class1:operation1 and the 3 actions are linked to method operations. This is not a "typo" tips.

activity example

You can look also to sequences diargam but it does not look like a flow chart.