简体   繁体   English

在建模上下文中:如何调用放置在类外部的方法

[英]In modeling context: How to call a method that placed outside class

在此处输入图片说明

For example if method A return either 0 or 1 . 例如,如果方法A返回0或1。

If method A returns 1 then it should call method B. 如果方法A返回1,则应调用方法B。

How to visualize this in Class Diagram ? 如何在类图中可视化?

class diagrams are static diagrams, you can not show the behavior in a class diagram. 类图是静态图,您不能在类图中显示其行为。 You have to do a sequence or activity diagram. 您必须做一个序列图或活动图。

see sparx tutorial or eclipse tutorial For your case, an opt combined fragment should do the job. 请参见sparx教程eclipse教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM