关于包的UML

UML about packages

好的,我正在准备考试,我需要这个问题的答案,我在书中找不到。希望你能帮助我。

A package 访问 B package 需要什么? (2 个答案中的 1 个是正确的)

  1. A 将导入 B 并且 B 将导出建立更适合的可见性的元素
  2. 我们只需要 <<import>>AB

非常感谢

您将需要一个 <<import>>,如第 12 页的 UML 规范中所述。示例中的 32:

In Figure 7.9, a number of PackageImports are shown. The public members of Types are imported into ShoppingCart and then further imported into WebShop. However, the members of Auxiliary are only privately imported by ShoppingCart and cannot be referenced using unqualified names from WebShop.