包图

UML中对模型元素进行组织管理是通过包来实现的。它把概念上相似的、有关联的、会一起产生变化的模型元素组织在同一个包中,方便开发者对复杂系统的理解,控制系统结构各部分之间的连接。而包图是由包与包之间的联系构成的,它是维护和控制系统总体结构的重要工具。

包图的基本概念

模型的组织结构:计算机系统的模型自身是一个计算机系统的制品,被应用在一个给出了模型含义的大型语境中。该模型包括模型的内部组织、整个开发过程中对每个模型的注释说明、一个缺省值集合、创建和操纵模型的假定条件以及模型与其所处环境之间的关系等。

        模型需要有自己的内部组织结构,一方面能够对一个大系统进行分解,降低系统的复杂度;另一方面允许多个项目开发小组同时使用某个模型而不发生过多的相互牵涉。我们对系统模型的内部组织结构通常采用先分层再细分成包的方式。

包的命名和可见性:包图是一种维护和描述系统总体结构模型的重要建模工具,通过对图中各个包之间关系的描述,展现出系统的模块与模块之间的依赖关系。

        包是包图中最重要的概念,它包含了一组模型元素和图。对于系统中的每个模型元素,如果它不是其他模型元素的一部分,那么他必须在系统中唯一的命名空间内进行声明。

包的构造型和子系统:包也有不同的构造型,表现为不同的特殊类型的包,例如模型、子系统和系统等。模型是从某一个视角观察到的对系统完全描述的包。它对其他包没有很强的依赖关系,如实现依赖或继承依赖。跟踪关系表示某些连接的存在,是不同模型的元素之间的一种较弱形式的依赖关系,他不用特殊的语义说明。通常,模型为树形结构。根包包含了存在于他体内的嵌套包,嵌套包组成了从给定观点出发的系统的所有细节。

        子系统是有单独的说明和实现部分的包。他表示具有对系统其他部分存在接口的模型单元,子系统使用具有构造型关键字“subsystem”的包来表示。系统是组织起来以完成一定目的的连接单元的集合,由一个高级子系统建模,该子系统间接包含共同完成现实世界目的的模型元素的集合。一个系统通常可以用一个或多个视点不同的模型描述。系统使用一个带有构造型“system”的包表示。

包的嵌套:包可以拥有其他包作为包内的元素,子包又可以拥有自己的子包,这样构成一个系统的嵌套结构,以表达系统模型元素的静态结构关系。

包的联系:包之间的关系总的来讲可以概括为依赖关系和泛化关系。两个包之间存在着依赖关系通常指的是这两包所包含的模型之间存在着一个依赖或多个依赖。对于由对象类组成的包,如果两个包的任何对象类之间存在着一种依赖,则这两个包之间就存在着依赖。包的依赖联系同样是使用一根虚箭线表示的,虚箭线从依赖源指向独立目的包。

posted @ 2018-11-27 10:31  strawqqhat  阅读(555)  评论(0编辑  收藏  举报
#home h1{ font-size:45px; } body{ background-image: url("放你的背景图链接"); background-position: initial; background-size: cover; background-repeat: no-repeat; background-attachment: fixed; background-origin: initial; background-clip: initial; height:100%; width:100%; } #home{ opacity:0.7; } .wall{ position: fixed; top: 0; left: 0; bottom: 0; right: 0; } div#midground{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -1; -webkit-animation: cc 200s linear infinite; -moz-animation: cc 200s linear infinite; -o-animation: cc 200s linear infinite; animation: cc 200s linear infinite; } div#foreground{ background: url("https://i.postimg.cc/z3jZZD1B/foreground.png"); z-index: -2; -webkit-animation: cc 253s linear infinite; -o-animation: cc 253s linear infinite; -moz-animation: cc 253s linear infinite; animation: cc 253s linear infinite; } div#top{ background: url("https://i.postimg.cc/PP5GtGtM/midground.png"); z-index: -4; -webkit-animation: da 200s linear infinite; -o-animation: da 200s linear infinite; animation: da 200s linear infinite; } @-webkit-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-o-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @-moz-keyframes cc { from{ background-position: 0 0; transform: translateY(10px); } to{ background-position: 600% 0; } } @keyframes cc { 0%{ background-position: 0 0; } 100%{ background-position: 600% 0; } } @keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-webkit-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-moz-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } } @-ms-keyframes da { 0%{ background-position: 0 0; } 100%{ background-position: 0 600%; } }