Questions tagged [class-diagram]

A class diagram describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among the classes.

A class diagram describes the structure of a system by showing the system's classes, their attributes, operations (or methods), and the relationships among the classes.

See class diagram

183 questions
48
votes
4 answers

UML class diagram notations: Differences between Association, Aggregation and Composition

I'm confused about some of the notations of UML class diagrams. Pretty sure I know what Association means. Any relationship between instances of two classes, where an instance of one class needs to know about an instance of the second class in…
Aviv Cohn
  • 21,538
12
votes
3 answers

Software architecture vs System architecture vs Class diagrams?

I'm quite confused about the following terms: Software architecture Software application architecture is the process of defining a structured solution that meets all of the technical and operational requirements, while optimizing common quality…
11
votes
3 answers

How do you annotate instantiation in UML class diagrams?

Given this pseudo code: class B { } class A : B { int val; }; alpha = new A(); What arrow do I draw between alpha and A in a UML class diagram? Is this even something UML is meant to do? +-------+ +-------+ +-------+ | alpha |…
9
votes
4 answers

How to represent constants in UML class diagram?

I am working on developing a UML class diagram from C++ code. I have a classless header file that is basically a definitions file (it has structs, enums and defined constants). I know how to represent structs and enums in general, but I am unclear…
ÁEDÁN
  • 153
9
votes
3 answers

Should I create Use Cases or create Class Diagrams first?

So I'm designing an Education Management System and I'm wondering if I should be creating the Use Cases or the Class Diagrams first?
Jarred Sumner
  • 239
  • 2
  • 8
9
votes
2 answers

What does the arrow mean in a Class Diagram?

I need help trying to understand what the meaning of the arrow in a UML Class Diagram is, more specifically in this Composite Diagram. What's the difference between the simple line (from a class to another one) and the arrow (not the inheritance…
8
votes
6 answers

UML: Going from Use Case to Class Diagram

In simple steps how can one make the transition from a Use Case diagram to a Class diagram?
James P.
  • 1,223
7
votes
1 answer

Modelling java annotations in an UML class diagram

Goal: I am trying to create a UML class diagram for a java spring application. Spring uses a lot of annotations and I couldn't find any resources online on how to properly model them in UML. I know that there is this question and it gives a good…
6
votes
2 answers

Creating sequence diagrams for use cases

If I create a sequence diagram for a use case, should the objects in the sequence diagram be based on the methods and classes in the class diagram, or is that not necessarily required?
Manar
  • 141
6
votes
1 answer

How to model user management using UML class diagram?

I have school project where me and my team have to build a health care system. It consists of different modules including : A module for doctors : It allows a doctor to access the medical records of his patients, send indications to them, consult…
6
votes
1 answer

How to display in compositional relationship that the item knows about the container?

I'm drawing a class diagram and noticed that sometimes I got a relationship (composition or aggregation) where the item uses the container, and sometimes not. What is the visual difference in a composition where the item class uses the container…
p1100i
  • 1,808
  • 1
  • 11
  • 13
6
votes
5 answers

How to Model a simple file-system by UML class diagram

I want to model a file system which contains both files and directories, and directories can contain either files or other directories. This is what I have reached so far: In OOSE book, however, a similar model is presented: Now I have two…
Isaac
  • 265
5
votes
2 answers

Associations and References in UML Class Diagram

Is it possible to have an association without explicitly indicating the reference attributes in the participating classes in the UML class diagram? For example, consider this example : We can see there is an association between the customer and…
5
votes
6 answers

UML aggregation: how can the "whole" exist without its "parts"?

I understand aggregation is a "whole/part" relationship, where the "parent" class is the whole and the "child" class is the part (and this is unidirectional), and that each class exist independently (as opposed to composition). But some examples…
Floella
  • 383
  • 2
  • 9
5
votes
2 answers

How to improve this UML class diagram?

How can I improve this UML class diagram? I'm really confused about the relationship between Expense and Category, because Category and Expense can exist by themselves: you can register Expense and not assign a category, you can add new Categories…
1
2 3
12 13