作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2006, Vol. 32 ›› Issue (21): 79-81. doi: 10.3969/j.issn.1000-3428.2006.21.028

• 软件技术与数据库 • 上一篇    下一篇

实现UML二元关系的规范化方法

王 鑫,袁晓洁   

  1. (南开大学信息技术科学学院,天津 300071)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2006-11-05 发布日期:2006-11-05

Normalization Method to Implement UML Binary Relationships

WANG Xin, YUAN Xiaojie   

  1. (School of Information Technical Science, Nankai University, Tianjin 300071)
  • Received:1900-01-01 Revised:1900-01-01 Online:2006-11-05 Published:2006-11-05

摘要: 由于建模语言和程序设计语言之间缺乏准确的映射机制,UML二元关系的存在为设计到实现的自动转换造成了许多困难。解决问题的关键在于如何定义一种规范化的方法,用于在程序设计语言中准确地实现UML二元关系。该文围绕UML二元关系的定义问题,从4种基本属性出发,提出关联、聚合与组合关系的形式化定义,并给出在C++中实现这些关系的规范化模式。

关键词: 二元关系, 关联, 聚合, 组合, UML

Abstract: Since there is no precise mapping mechanism between modeling languages and programming languages, the existence of UML binary relationships causes many difficulties in transforming automatically from design into implementation. The key part of the solution to this problem lies in how to define a normalization method to implement UML binary relationships precisely in programming languages. This paper centers on the definition problem of UML binary relationships. Based on four fundamental attributes, it presents formalization definitions of association, aggregation and composition relationships. Normalization patterns to implement these relationships in C++ are also provided.

Key words: Binary relationships, Association, Aggregation, Composition, UML

中图分类号: