gpt4 book ai didi

java - uml 类中缺少返回类型

转载 作者:行者123 更新时间:2023-12-02 01:42:30 25 4
gpt4 key购买 nike

我必须编写对应于以下类图的java代码: enter image description here

缺少有关方法的可见性和返回类型的信息怎么办?可见性是否理解为“包”?返回类型是否被理解为“void”?

最佳答案

在第 14 页上。 UML 2.5 的第 53 条(第 7.8.12 节 PackageableElement):

A PackageableElement must have a visibility specified if it is owned by a Namespace. The default visibility is public.

在第 14 页上。 UML 2.5 的 116(第 9.6 节操作):

<return-type> is the type of the return result Parameter if the Operation has one defined.

所以用 Cxx 术语来说就是 void .

关于java - uml 类中缺少返回类型,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54261481/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com