class-diagram

How to represent Javascript object creation with an UML class diagram?

 ̄綄美尐妖づ 提交于 2021-02-17 22:00:27
问题 I'm having some trouble drawing an accurate UML Class diagram for my JavaScript APP. I've read several UML reference resources, but still didn't find an answer for my situation, since all the examples are based on the classical inheritance and class model of C++/Java. I want to represent the creation of a custom JavaScript object with a constructor function and extension of it's prototype object, which is quite different from C++/Java class instantiation. How would you represent this

UML Class Diagram - Modelling with Enumeration

落花浮王杯 提交于 2021-02-16 14:53:06
问题 In a UML class diagram, how would I model a tutor can work multiple days of the week without knowing specifically? In my current solution: 1 or more tutors work on 1 or more days of the week . 回答1: Since the list of days when Tutor work is only an attribute and doesn't seem to have any specific structure to build a class around it, it should rather be an inline attribute with type DaysOfTheWeek and multiplicity 1..7 . Also since you can't work twice at the same day you should add unique

how to draw java uml class diagram with enum being created within another class [duplicate]

陌路散爱 提交于 2021-02-05 10:39:07
问题 This question already has answers here : How to represent the nested class of C++ in UML? (3 answers) Closed 7 months ago . Say I have a class name A. Within this class I define enum B by public enum B {AA,BB,CC} . Now I want to draw a uml to reflect this relation ship, how should I do this? 回答1: In a class class diagram the representation uses (+)---- , for instance : 来源: https://stackoverflow.com/questions/62608571/how-to-draw-java-uml-class-diagram-with-enum-being-created-within-another

How to modelling different types of fields and entities connection in UML

落爺英雄遲暮 提交于 2021-01-28 06:06:28
问题 The task: Each field has place for multiple entities and have 1-10 neighbors. The fields are different. Some of them are trapped and if an entity steps on them they will not be able to leave. There are also radioactive fields and if an entity spends too much time on them, they dies. Fields can not be trapped and radioactive at the same time. There are two different entities. Some of them are able to escape from trapped fields (E1) and some of them are immune for radioactivity (E2). Entities

Uml / sequence / package / … diagram alternative for JavaScript and Electron application?

久未见 提交于 2021-01-27 23:45:22
问题 My question is if there are any kind of diagram I could draw in order to visualise and Electron / JavaScript application? I would need alternative for the different uml diagrams, like class or package diagram but since JS is prototype-based and it's not like Java or C# I don't know what I could do. The only one I might be able to make is a sequence diagram, but I should (probably must) make other diagrams as well. 回答1: First of all, you're not obliged to document everything in UML diagrams at

How to show private inheritance relationship in a UML class diagram

霸气de小男生 提交于 2020-12-29 03:02:36
问题 In C++ since private inheritance is not considered as an is-a relationship, how is it supposed to be shown in a class diagram and if it is shown as a has-a relationship then how can it be differentiated between a composition and a private inheritance? 回答1: It should be a Composition relationship (solid black diamond on the subclass side), because: Private inheritance means "implemented in terms of" but in this regard it can be simply treated the same as "has a" relationship. An instance of

Modelica class diagrams

冷暖自知 提交于 2020-08-22 06:35:26
问题 I am looking for a tool that can (automatically) create class diagrams like this one from Modelica code: https://trac.modelica.org/Modelica/attachment/ticket/85/classDiagramModelicaMedia.png I need to create a couple of such diagrams and an automated solution would help a lot! So far, I found this article about Modelica CDV (class diagram viewer): https://www.modelica.org/events/modelica2006/Proceedings/sessions/Session1c1.pdf but not a ready to use tool. Any ideas? 回答1: This can be done with

How to model a covariant association-class in UML?

╄→гoц情女王★ 提交于 2020-07-22 10:59:20
问题 In short I would like to model a covariant association between two classes, that can each be specialized. I need to show the specialization of the related association-classes. But I want to avoid that my model could mean that there are redundant associations (i.e. one between the generalizations and one between the specializations. Step by step explanation of the problem I have in an UML class diagram a many-many association between a Person and a Contract . A person can be involved in