class-diagram

JavaScript code to Class Diagram

流过昼夜 提交于 2019-12-29 20:00:01
问题 I am looking for a tool that can generate class diagram from JavaScript code. Similar to the ones for C++ and Java. Is there any? 回答1: http://jsuml.org/ 回答2: If you are using node.js, i made a module that generate a class diagram for javascript/node/html/css. Its called wavi. For javascript, function and variable are recognized. https://www.npmjs.org/package/wavi 来源: https://stackoverflow.com/questions/943212/javascript-code-to-class-diagram

Representing a C# Generic Method in a UML Class Diagram

二次信任 提交于 2019-12-28 17:42:52
问题 I have the following interface: public interface IRegisterable { T Register<T>(string username, string passw) where T : User, ICanLogin, new(); } User is an abstract class, and ICanLogin is another interface. Now, I want to represent the above interface with its method in a UML Class Diagram, in Visio. How can I represent the above generic method with its constraints in a Class Diagram ? 回答1: UML does not support type parametric methods directly. About the closest you'll get is to define a

how to write data attributes in UML with typedef unsigned

独自空忆成欢 提交于 2019-12-25 04:28:49
问题 this is my sample code my question is how am i going to write uint delay in UML Class Diagram, because it is typedef unsigned -----------------------------------------------------------------------------------------should i write it like this? - delay : int or this way? - delay : uint --------------------------------------- typedef unsigned int uint; class MyBreakoutGameType : ... { public: private: uint delay; }; 回答1: Your diagram for the mentioned code should look like 回答2: Version 13.5 of

UML class diagram: Association or Composition?

三世轮回 提交于 2019-12-24 10:04:28
问题 I'm a little confused on what the relationship would be for the scenario below. When examples of composition are used they always tend to use simple ones such as rooms and a building. This scenario is that doctor patient visits are recorded. Would it be an association, composition or a mix of both? I've included a picture below of the two different relationships I am stuck between. I am thinking composition because the visit belongs to each party? Derived association 回答1: In general my rule

UML class diagram for simple web portal [closed]

我与影子孤独终老i 提交于 2019-12-24 02:18:07
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . I want to ask you about my class diagram. I'm making a class diagram for simple web portal for my weekend university studies. Is it made correctly? What would you change if I you were mine? Use cases you can find here Class diagram from use case diagram. Should I create each

Implementing Connections within Aggregation classes

陌路散爱 提交于 2019-12-24 02:14:12
问题 In the below diagram, the class "Copy" and class "Book" are showing an aggregation (Book has a Copy). All other classes are sub classes of class "Copy". Now, imagine there is a Member class, which has to access the sub classes "Lending" and "Borrow" of class "Copy". The only thing that ' Member ' class should know is "accessionNumber". If we think of this in terms of code, my " Book " class contains an array of " Copy ". How can I know the accessionNumber of a particular book? Lets say I need

How to generate class diagrams and sequence diagrams from existing code?

感情迁移 提交于 2019-12-23 18:24:17
问题 I have a Java code which I need to generate the class diagrams and sequence diagrams. I am using netbeans, but the code is 100% pure hand coded. How can I generate the class diagrams and sequence diagrams for existing code using netbeans? The code is separated into packages, so I need to generate class diagrams package wise. Which means, for an example, diagram 1 for package 1, diagram 2 for package 2 etc. Finally I need to take the generated GUI as an image. Please help! 回答1: IMO, generating

Active class versus passive class

非 Y 不嫁゛ 提交于 2019-12-21 03:36:09
问题 In UML specification superstructure 2.5(still Beta, page 203) A Class may be designated by setting isActive to true as active (i.e., each of its instances is an active object). When isActive is false the Class is passive (i.e., each of its instances executes within the context of some other object). I wonder if there is a simple example illustrates the differences in applying each one of them? And elaborate this concept a bit? 回答1: By definition, Active Objects In UML, active classes, and

Generating UML diagram from Scala sources [closed]

送分小仙女□ 提交于 2019-12-20 11:10:22
问题 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 4 years ago . Is there any stand-alone tools (not Eclipse or Idea plugins) for generating class diagram from Scala source files? 回答1: try Acceleo see an example of using it with scala here 回答2: I had exactly this problem and couldn't find anything that would quickly draw a hierarchy from some Scala source code so I ended up

can I use different two class diagrams for two different environments? [closed]

北城余情 提交于 2019-12-20 06:18:23
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 2 years ago . I'm working on project for two different environment which are iOS and Android, and it's so hared for me to design one class diagram for two different systems, so can I use two class diagrams, one for android and the other for iOS ? I mean it doesn't make any sense to use the