check class and object

10 years 6 months ago #598 by lanxinsheng
hello,

Could you show me how to instantiate a class (a class whose attributes with specific value)? Thank you!

Please Log in or Create an account to join the conversation.

10 years 6 months ago #599 by barbe.rousse
Hi lanxinsheng,

If you want to instantiate a class C for example,
start by creating an Object diagram and an Instance inside.
Then select the instance and set the Class C as "Base" of your instance(in the Element tab).
And finally, right-click on your instance and use the command Modeling Wizard -> Update instance and part ...

Hoping it helps,

Regards,

BR
The following user(s) said Thank You: michaelp

Please Log in or Create an account to join the conversation.

3 weeks 6 days ago - 2 days 14 hours ago #6553 by gfocaraccio
I just drag the class from the explorer window onto an object diagram and that creates the instance for me. You can drag the class onto the diagram multiple times to create multiple instances. The newly created instances is located in the same package than the diagram.

Please Log in or Create an account to join the conversation.

Moderators: tma
Time to create page: 0.410 seconds
^ Back to Top