2

I had to develop an application in Java for a school project, so I designed a UML class diagram oriented towards Java (including structures, attributes and types). For example:

-getLists() : List<String>

So the question is: should I assume which language I'll be using when creating a UML class diagram or should I take a more generic approach?

asked Mar 17, 2017 at 17:32

2 Answers 2

3

A rule of thumb is that the UML model should be technology independent. Having said that I would add that sometimes you use some constructs which might be more related to a specific technology (like multiinheritance).

In your case instead of

-getLists() : List<String>

use multiplicity:

-getLists() : String[*]

to indicate a collection of Strings. This is UML compliant.

answered Mar 17, 2017 at 19:03
2

If you know the language that will be used, I don't think it can hurt to use the naming conventions, notation, and so on of the language. It will save time when it comes time to code, and it can help you work out the exact contracts of your interface.

answered Mar 17, 2017 at 17:37

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.