uml

UML for OCaml immediate objects

旧时模样 提交于 2019-12-10 19:16:20
问题 I have created an immediate object in OCaml. let x = object (self) val dataMember = 3 method aMethod = print_endline "Called a method" end;; As the object doesn't have a name (is it considered anonymous?), how can it be correctly represented in UML? Thanks. 回答1: You could give it a nonce-name, or some other formulaic value. "Correctly" in this context really just means something that will be clear. There is no "right answer" handed down from the International UML Standards Body or anything.

How to represent a .NET dictionary type in UML?

时光总嘲笑我的痴心妄想 提交于 2019-12-10 19:06:15
问题 I'm creating a uml class diagram and I would like to know if anyone can assist me with this. I would like to know how to represent a dictionary type using UML notation. for example how can I represent the following dictionary( Dictionary<FileType,StorageType> )type in UML. 回答1: It depends on what information you are trying to convey in your diagram. However you could: Attach a stereotype to your relationship Use an association class Use a Ternary association Decide the collection type is an

How to express mutually exclusive inheritance in UML?

被刻印的时光 ゝ 提交于 2019-12-10 19:06:13
问题 How to exemplify that a class can inherit either of two super-classes, but not both? The class Property can either represent a Set of numbers, or a Cardinal number, BUT not both at the same type. 回答1: Your sub classing is upside down. You need a Set Property and a Cardinal Property that specialize Property . If those subclasses also have characteristics of Set and Cardinal , you could subclass those as well. 来源: https://stackoverflow.com/questions/38830845/how-to-express-mutually-exclusive

UML类图简单介绍

ε祈祈猫儿з 提交于 2019-12-10 18:51:58
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 先上一张图: 概述 类图(Class Diagram)是面向对象系统建模中最常用和最重要的图,是定义其它图的基础。类图主要是用来显示系统中的类、接口以及它们之间的静态结构和关系的一种静态模型。 类图组成 类图(Class Diagram)是一个分为三个部分的矩形:上面的部分显示类的名称,居中显示, 类名是斜体 表示的是 抽象类 ;中间部分显示类的特性(字段和属性);下面的部分显示类的操作(方法或行为)。 注意前面特性和操作部分的符号含义: + 表示属性或方法是公用的(public) - 表示属性或方法是私有的(private) # 表示属性或方法是保护的(protected) 接口 接口(Interface)与类图基本一致,主要区别在于接口顶端有 <<interface>> 表示。 类图中关系图示说明 注:下面的是以上面的图为例说明。 继承(Generalization)/泛化(Generalization) :空心三角形+实线 实线从子类指向父类,空心三角形与父类连接。(动物和鸟的继承关系) 实现(Realization) :空心三角形+虚线 虚线从实现类指向接口,空心三角形与接口连接,在类图中就是接口和实现的关系。(实现大雁飞翔的接口) 依赖(Dependency) :虚线箭头

Understanding a C++ codebase by generating UML - tools&methology [closed]

冷暖自知 提交于 2019-12-10 18:47:26
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I think there are many tools that can generate UML and similar diagrams from C++ (source-code), but I think it is not so easy to make sense of what you get out? I am looking for good tools/procedures. For example I might want to see the GUI-layer and how it is separated (or not from the rest). Think the tools

Visual Basic 6.0 UML Diagram generator

回眸只為那壹抹淺笑 提交于 2019-12-10 18:45:30
问题 Are there any free UML diagram generator that could convert a VB6 source code into a UML diagram? 回答1: Have you seen the built-in Visual Modeler mentioned by Deanna here? If you haven't tried it yet: Add-Ins menu in VB6, Add-in Manager. Set Startup/Loaded for Visual Modeler Add-in and Visual Modeler Menus Add-in. Then under the Add-Ins menu, you should see Visual Modeler ==> Reverse Engineering Wizard. It was good enough to diagram classes in our (large) project. 来源: https://stackoverflow.com

How should I represent the main method (java) using UML?

眉间皱痕 提交于 2019-12-10 18:37:48
问题 I have three classes: Bridge, Main and Car. I have no idea about how to include the main method in my UML representation. Should I list all the attributes...as well as the main method? The main method does: - a bit of calculation - instantiate the other two classes I would draw the Main, this way: --------------------------- Main --------------------------- --------------------------- + main(String[] args): void --------------------------- Is that correct? Thanks 回答1: Your drawing is good,

How to model classes that do calculations and store them?

☆樱花仙子☆ 提交于 2019-12-10 18:24:33
问题 I have to develop a class, part of a financial application, which receives two properties and returns two results. Before you think that it is not a class, but method(s), I have to say that I have to persist both: the two user-provided parameters and the two outputs. Let's illustrate like follows in this mock: ---------------- |PetWash | |----------------| |petWeight |<- user provided |petHeight |<- user provided |ammountSoapUsed |<- system calculated |price |<- system calculated ------------

how do i avoid a circular relationship in my class diagram

时光怂恿深爱的人放手 提交于 2019-12-10 18:22:04
问题 Hi I have a question about some circular relationships that I am facing with my database design . I read a few more similar questions but couldn't solve my problem, so here is my class diagram : and here is the logic: A document belongs to a DocumentType ( invoice , order form , ..) a documentField ( date , address , nameClient , ... ) belongs to a documentType ( each documentType has its proper fields the FieldValue is the value of documentfield that will be saved in database it belongs to

UML Design class diagram: Class with another class as attribute?

时光怂恿深爱的人放手 提交于 2019-12-10 17:47:42
问题 I'm having a pretty hard time trying to figure out how to model a certain scenario as a UML design class diagram. Suppose I have the following situation: I have a class named CPoint that has two attributes: x and y (coordinates in a R2 plane). In the other hand, I have a class named CLine that should have two CPoint as attributes. This is pretty straight forward to code (I'll use C++ in my example): class CPoint{ float x; float y; //Constructor, gets and sets here } And for CLine: class CLine