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.
177
questions
1
vote
1
answer
96
views
Is it appropriate to include a "select all" function in a Class Diagram?
Background
Working towards my final project at University, team project and we're stuck with a disagreement on a point in our Class Diagram.
We have a class, called "Road".
In here with have ...
2
votes
2
answers
132
views
Help me clarify the cardinality for some concepts for a model
So I have a security model and am having problem with deciding the cardinality. This is what I have now:
Threat may result in Attack.
Direct Association
One-to-Many (0..*)
Attack exploits ...
5
votes
2
answers
568
views
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 ...
0
votes
4
answers
324
views
Should I model constraints which are valid, but which have no current function in the domain?
When domain modelling, should a valid constraint - or "natural" constraint - be modelled, even if there are no current business processes which rely on the constraint being asserted.
As an ...
1
vote
1
answer
146
views
Design User Permissions
I'm building a ToDo list while practicing in different patterns and adding more complexity to the project.
The problem which I'm currently facing is to how to apply (and later use, validate and ...
2
votes
3
answers
146
views
Which association should be in the class diagram
there are a vehicle class and customer class . In short, in the customer class there is a function that shows 'can this person or company rent that car'.The function uses a object of vehicle and ...
1
vote
1
answer
112
views
Correct way to represent acquaintance enforced by interface in UML class diagram
Suppose I have the following client code:
using System;
namespace InterfaceCompositionUml
{
internal class Program
{
static void Main(string[] args)
{
...
-2
votes
1
answer
105
views
UML relationships
Could someone explain to me if the relation in this class diagram is a "dependency" or "association" relationship and why?
I cannot edit the picture. The terms translate into ...
1
vote
2
answers
212
views
What if the parent can't exist without a child? (Class diagram)
I've built a matchmaking system where two of the classes look like this:
I know that it actually looks like an inheritance, but in the code it doesn't extend to the PlayerInMatchmaking and the ...
3
votes
1
answer
218
views
GOF class diagram for Builder pattern appears to contradict its corresponding sequence diagram
In the Design Patterns: Elements of Reusable Object Oriented Software, the Gang of Four present the following canonical form for the Builder pattern:
In Appendix B the following is mentioned ...
1
vote
1
answer
109
views
UML Class Diagram Excersise
Problem statement:
The information system of a university must manage information relating to its employees, departments,
institutes, courses provided, and research projects.
Information relating to ...
0
votes
1
answer
120
views
I'm very confused coming from MYSQL, is it necessary to "connect" classes via matching IDs as attributes or are associations enough?
I'm making a class diagram for my school project, an Inventory Management System. So far, I've made the use-case and activity diagrams, however, I'm struggling with the class diagram and mostly ...
2
votes
1
answer
661
views
UML Diagram double arrow
In a Microsoft Learn article on MVVM there is an, what I assume, UML diagram that didn't make sense to me. (https://learn.microsoft.com/en-us/archive/msdn-magazine/2009/february/patterns-wpf-apps-with-...
-2
votes
1
answer
1k
views
How to add methods in a class that uses other classes in UML class diagrams?
I have an index file that uses three main JS classes each defining one method. The JS application is about listing a folder datasets, deleting a dataset from that folder, or uploading a dataset from ...
1
vote
2
answers
338
views
How to deal with often repeated relations in UML Class Diagrams / ERM?
Suppose you have a ERM containing about 40 Classes / Entities. Most of them in quantified relations to others, some of them as standing there alone.
How to deal with a very often used relation/...