This site uses cookies to deliver our services. By using this site, you acknowledge that you have read and understand our Cookie and Privacy policy. Your use of Kontext website is subject to this policy. Allow Cookies and Dismiss

VS2010新特性-Modeling Project-UML Class Diagram 类图

411 views 0 comments last modified about 9 years ago Raymond Tang

In this page

类图展示了一组类、接口、子类以及他们之间的关系,在建模中最常用到的图就是类图;可以用类图说明系统的静态设计视图。

一,新建类图

选中ModelingProjectTest,右键|Add|New Item|Installed Templates|Modeling|UML Class Diagram,输入文件名称UMLClassDiagramTest.classdiagram,点击Add按钮,即建立了一个空的类图。
二,类图包含的内容
                           

相关说明如下表所述:

Class

添加一个类

Interface

添加一个接口

Enumeration

添加一个枚举类型

Package

添加一个包,这个包可以包含类以及其他包

Association

指定源类型与目标类型之间存在一种关系

Comment

添加备注

Aggregation

指定源类型引用目标类型的部件,且这些部件还能被其他类型共享使用

Composition

指定源类型包含了目标类型的部件,且这些部件不能被其他类型使用

Dependency

指定某一个类型依赖于其他类型

Inheritance

指定一个类型继承或者实现了另一类型的属性、操作、约束等

Package Import

指定一个包从其它包导入了类型

三,实现类图

下面实现http://hi.baidu.com/1987raymond/blog/item/0c3835246bc58623d5074270.html文章中的类图。

如下图所示:


在上图中,User这个类具有UserName属性;ATM这个类具有ValidatePassword这个方法,且方法有一个String类型的参数;一个用户可以拥有多个RMB账户或者USD账户;而RMB账户和USD账户都是继承自账户类Account;Account与ATM是多对多的关系,一个账户可以在N个ATM上使用,一个ATM也可以接纳N个不同的ATM。

Related pages

ASP.NET Core 2 with Bootstrap 4 Bundler Minifier Issue: Expected semicolon or closing curly-brace found '-'

766 views   1 comments last modified about 7 months ago

Background When upgrading Bootstrap to v4.0.0 release, the bundler and minifier doesn’t work properly due to CSS variable is commonly used: :root{--blue:#007bff; About 26 errors will show up in the Error List with the following message: ...

View detail

Migrate ASP.NET Core Projects – VS2015 to VS2017 and TFS2015 to TFS2017 Issues and Fixes

423 views   0 comments last modified about 2 years ago

Context Before Visual Studio 2017 was released, I was implementing my ASP.NET Core project using VS2015. TFS2015 is used for Continuous Build and Deployment for my projects. After migrating to VS2017, there are couple of issues I encountered in my environment: VS2017 has ...

View detail

Understand Code Dependencies with Visual Studio

554 views   0 comments last modified about 4 years ago

Visual Studio provides a convenient tool to generate visual code dependencies. It helps to identity circular references issues and also hubs. To learn more details about this function, visit ...

View detail

开始下载安装Visual Studio 11 Beta吧!

247 views   0 comments last modified about 7 years ago

  ...

View detail

Visual Studio 2011 New Features 新增特性汇总

257 views   0 comments last modified about 7 years ago

本文将介绍Visual Studio 11 Express for Windows Developer Preview中包含的新特性。

View detail

VS2010新增的IDE特性与功能之C#程序员篇

278 views   0 comments last modified about 9 years ago

注:本文参照MSDN博客C# FAQ的文章http://blogs.msdn.com/csharpfaq/archive/2010/05/10/new-ide-features-in-visual-studio-2010-for-c-developers.aspx;但不是完整翻译,而是提取主要内容以供大家参考,感谢原作者的奉献。一,Generate From Usage 从使用生成代码

View detail

Add comment

Please login first to add comments.  Log in New user?  Register

Comments (0)

No comments yet.