Skip to main content
10 votes

UML: what is the correct order of steps?

UML is just a language to draw pretty pictures with some chance that others understand what the shapes mean without an extensive explanation from you. UML does not tell you which diagrams to use in ...
Bart van Ingen Schenau's user avatar
8 votes
Accepted

Navigation in Class Diagram

Navigability means according to the UML specifications: that instances participating in links at runtime (instances of an Association) can be accessed efficiently from instances at the other ...
Christophe's user avatar
  • 78.4k
7 votes

Software architecture vs System architecture vs Class diagrams?

System architecture describes the components of the system. For example you might have an order entry system that consists of: Web Front End, Business Layer Service, and Data Store. So, you ...
Jon Raynor's user avatar
  • 11.6k
7 votes

UML Class Diagram: How to describe method functionality?

In a class diagram, you don't typically show the functionality of a particular method. That's not the purpose of a class diagram. You're right that you can use Object Constraint Language or pseudocode ...
Thomas Owens's user avatar
  • 83.3k
7 votes

Association + multiplicity vs aggregation and composition?

UML is not one of these mathematical computation models that try to achieve completeness with a minimal set of rules(like Turning machines or lambda calculus). UML is a visualization of software ...
Idan Arye's user avatar
  • 12.1k
7 votes
Accepted

How to design correctly relationships of class diagrams?

This is fine for a start, but you're pretty data-heavy. Object-orientation is about cooperation among objects, with each bringing its own specific knowledge and behavior to contribute to the whole. At ...
Robert Bräutigam's user avatar
7 votes

Should I model constraints which are valid, but which have no current function in the domain?

In the past, I have experienced both kinds of situations: cases where a system contained things like constraints which were surely added in good faith, but were never really needed - and later turned ...
Doc Brown's user avatar
  • 209k
6 votes
Accepted

UML Class Diagram: How to describe method functionality?

However, I am still unsure how or where I am supposed to describe the functionality that a method of a class offers. This is a valid concern. I should be able to look at your UML diagram and have a ...
candied_orange's user avatar
6 votes

Role design pattern in uml

Can a class inherited an implementation of interface ? The interface realization expresses that a class X implements a an interface I. Class X can then, like any other class be specialized further ...
Christophe's user avatar
  • 78.4k
6 votes
Accepted

Which SOLID principles are broken by this class diagram?

The only principle which is not respected here is the Interface Segregation Principle: E-book inherits stock and replenishStock() which are absolutely useless for an electronic book. If you want to ...
Christophe's user avatar
  • 78.4k
6 votes
Accepted

Can I make a separate use case and class diagram for each module?

Use case diagrams describe the whole systems behavior of how it interacts with the outside actors. These are documents1 made during the requirement analysis phase, and done independently (and before) ...
πάντα ῥεῖ's user avatar
6 votes

UML: what is the correct order of steps?

Bart van Ingen Schenau's answer is right in that UML is just a language and not a methodology. However, there are some methodologies that are built around tools (including UML), such as the Rational ...
Thomas Owens's user avatar
  • 83.3k
6 votes
Accepted

When modeling requirements, how can I depict class diagram attributes whose allowed values are custom defined and in finite number?

This problem can be solved in two ways: either by using the enumeration concept from the UML 2 standard, or by doing the simplest thing that works. Enumerations in UML 2 (based on the UML 2.5.1 ...
amon's user avatar
  • 135k
6 votes
Accepted

Associations and References in UML Class Diagram

So long as the reference isn't to a basic data type, not only is it possible, it's common practice. Redundantly showing both is also possible. But I've never seen a rule requiring it. It's also common ...
candied_orange's user avatar
5 votes

How to represent the following scenario in a class diagram?

I'm sorry, but I have to inform you that there is no "correct" or "wrong" in class designs. You can do "wrong" UML by drawing strange unicorns into the diagram, but whether your design is good enough ...
Frank's user avatar
  • 14.4k
5 votes
Accepted

How to model user management using UML class diagram?

1. How to model a patient ? Your design, with its Account, User, and the different derivates of users are already a good start. The Patient could indeed be a special kind of User. However, the ...
Christophe's user avatar
  • 78.4k
5 votes
Accepted

Use Case Diagram for Vending machine

A use case diagram in UML shows two things the actors that interact with the system the reason why each actor interacts with the system (i.e. the use case) Most importantly, a use case diagram does ...
Bart van Ingen Schenau's user avatar
5 votes
Accepted

(UML) Can parameter variables be omitted in a lengthy constructor?

The only UML diagram this is likely to apply to is the Class Diagram. In a class diagram, the constructor is treated as merely another method. It is sometimes prefixed with <<create>>, or ...
Robert Harvey's user avatar
5 votes
Accepted

UML v2.5.1 correct notation of blanks in operations (methods)?

The blanks in the specification of the notation are only there to separate the tokens for readability. If they Would be mandatory, they would have been added between quotes as literals (e.g. ‘ ‘, ‘:’,...
Christophe's user avatar
  • 78.4k
5 votes
Accepted

Connecting classes by passing method references

"I think this is a good solution, but I do not recognize the pattern" Your diagram does not depict the pattern/structure you're asking about in a particularly explicit way, so I'll continue ...
Filip Milovanović's user avatar
5 votes
Accepted

Is it appropriate to include a "select all" function in a Class Diagram?

A road-object would presumably represent a single road. A getRoads() would require the road to somehow know about all the other roads in existence. This would likely violate the law of demeter Each ...
JonasH's user avatar
  • 5,724
4 votes
Accepted

Should I show the association class in my class diagram?

According to the UML 2.5 specifications: 11.5.3.2: An AssociationClass is a declaration of an Association that has a set of Features of its own. This means that a many-to-many association with no ...
Christophe's user avatar
  • 78.4k
4 votes

Can a parent class not have attributes or functions?

If they truly share no behavior then they shouldn't share a base class. The real question is, do they share behavior and I think the answer is "yes" if your language supports generics or class ...
Greg Burghardt's user avatar
4 votes
Accepted

How to translate a class diagram to code?

It highly depends on your goal of what to achieve with your design. As it seems, you are not targeting a code generator that directly translates your class diagram into code. Hence, the diagram is ...
Frank's user avatar
  • 14.4k
4 votes
Accepted

How should libraries be shown in UML class diagram?

There are a few options. You could leave these classes out entirely. It would greatly simplify your diagram, but if you have classes that inherent from, extend, contain compositions or aggregations ...
Thomas Owens's user avatar
  • 83.3k
4 votes

Which SOLID principles are broken by this class diagram?

Most of the "principles" in SOLID (which are more like guidelines in most cases) are very context dependent, and we can't really see whether they are violated by the system you describe because we don'...
Jules's user avatar
  • 17.8k
4 votes
Accepted

Why does the Square–Rectangle problem violate SOLID principles?

There is no problem with the Single Responsibility Principle. The SRP doesn't say that the class shall do only one thing. It says that it should have only one reason to change. Some will argue that ...
Christophe's user avatar
  • 78.4k
4 votes
Accepted

What to do with data types with lots of connections in a UML class diagram

If a class X has an attribute or parameter of type Pose, you don't need to draw a dependency from X to Pose. Using Pose in a feature of class X implies that class X depends on Pose.
www.admiraalit.nl's user avatar
4 votes

Relating subclasses of two classes

You're using subclassing when instances will work fine and actually better — the users should be instances of User (or instances of an more general Person even better) rather than subclasses of ...
Erik Eidt's user avatar
  • 34.2k

Only top scored, non community-wiki answers of a minimum length are eligible