如何在类图中添加最终变量 [英] how do I add a final variable to class diagram

查看:30
本文介绍了如何在类图中添加最终变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在设计拼字游戏的类图.在其中一个类中,我声明了 final 变量.谁能告诉我,如何在 UML 类图中将变量表示为 final?

I am designing a class diagram for scrabble game. In one of the classes, I have final variable declared. Can anybody tell me, how can I indicate a variable as final in the UML class diagram?

推荐答案

常量(即最终)字段通过命名约定表示:常量应该在 ALL_CAPS

Constant (i.e. final) fields are indicated via naming convention: constants should be in ALL_CAPS

来源

这篇关于如何在类图中添加最终变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆