Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
0answers
57 views

UML Class Diagram HashMap with different Key datatype using Qualified Association

By using the qualified association element of UML Class Diagram, we can create HashMap as the datatype of one of our class attributes (see here). In my case, I have to use HashMap with different key ...
-3
votes
1answer
223 views

UML Class Diagram HashMap Data Type

How can I show a Java HashMap data type in UML Class Diagram (or C# dictionary)? I.E. This class: public class Test { private Map<String, String> map; private Map<String, int> ...
0
votes
1answer
76 views

UML Class Diagram with reference data type

For the following UML Class diagram, I have a reference data type Nurse, and I am using it in Hospital Class, is it needed all the time to describe the reference data types in UML Class diagram? Is ...
-3
votes
1answer
223 views

UML Class Diagram for python flask application

I have developed a web-application using python's Flask framework and MySQL for my software engineering project assignment. My Instructor asked us to submit UML diagrams for the Project, I was able to ...
3
votes
1answer
104 views

Can you place elements other than classes in a class diagram [closed]

I'm currently doing up class diagrams for a project I'm working on. I feel there's something that should be represented in my class diagram but I'm not quite sure. I have a .csv file which the ...
1
vote
1answer
78 views

Role design pattern in uml

In my UML class diagram, I have an interface called Contract which a Staff implements. There are two types of Staffs: one is partTime and the other is fullTime. Does that mean that the two partTime ...
0
votes
1answer
113 views

Class Diagram for Train-Wagon Senario

I have doubts on approaching doing this. I have a Train class and a Wagon class. There are three types of wagon: FirstClass, TouristClass and DiningCar. Each of these types has the same properties ...
0
votes
0answers
210 views

Is implementing anytime it makes sense aggregation and composition necessary good?

As I'm drawing my project's classes diagram, I'm wondering... Let's take Customer's relationship with Order for example. It seems pretty natural and logic to aggregate Orders to the User... So ...
2
votes
4answers
353 views

Is actor a own class

I have this sequence diagram and want to transform it into a class diagram. But I don't know if the actor (Customer) is in this case a own class or not. Normally the actor isn't a own class, but in ...
5
votes
4answers
4k views

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 ...
3
votes
2answers
173 views

Should I show the association class in my class diagram?

For example I have a relationship like this: user (0..*) buys product (0..*) Which results in an association class, called sale, which has the userID and productID. Just for the question's sake, ...
4
votes
3answers
1k views

UML Class Diagram: How to describe method functionality?

Recently, we have learned about UML class diagrams in university and I began applying that knowledge to my work projects. However, I am still unsure how or where I am supposed to describe the ...
0
votes
1answer
309 views

Should I make a separate class diagram for the administration part of my software?

I am building a software which has two types of users in it: main users and admins. I am still building the class diagram for this system. For the main user's relations I have things like: user ...
3
votes
1answer
3k views

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 ...
4
votes
1answer
714 views

Association + multiplicity vs aggregation and composition?

I know the differences between these associations (as described here). However I'm wondering: Composition, why not simply use an association with multiplicity of 1..* (and thus implicit saying that ...
3
votes
3answers
136 views

Can a parent class not have attributes or functions?

I have 3 Different Classes Which are representing different types of Sensors, for example: WaterLevelSensor DoorSensor TemperatureSensor Each Class has different functionality. Following the OOD ...
2
votes
2answers
97 views

When creating a UML class diagram, should I know which programming language will be used to develop the application?

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<...
1
vote
1answer
245 views

Doubt about representing a Shopping Cart in Class Diagram/ER Database implicating ORM

I have to do a task which is reading a text, and create a Class diagram. One of the entities is a Shopping Cart. My doubt is how to represent a Shopping Cart in a class diagram, later on an E/R ...
4
votes
2answers
861 views

How should libraries be shown in UML class diagram?

Maybe the title isn't that clear so I will explain this a little bit further. I use biojava to perform BLAST searches. However this BLAST.jar contains a lot of classes: org/biojava/bio/program/...
9
votes
3answers
3k views

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 ...
-3
votes
1answer
720 views

Turn based game class design

I wrote abstract base for some turn-based games (like chess or tic-tac-toe) and wrote game based on this base. And I stuck with choosing how to design class hierarchy. Here is two variants for wich I ...
4
votes
1answer
303 views

Class Diagram - Inheritance Relationship

If in class diagram I have a parent "Account" and three childs "Child1", "Child2", and "Admin". The "Admin" has control over "Child1" and "Child2" accounts. Will the relation be like this?
4
votes
3answers
2k views

How to translate a class diagram to code?

During the design stage, I usually come up with a class diagram that looks something like this However, during coding stage, I would never create a class like Librarian with issueStatus() or ...
2
votes
0answers
247 views

Understand the service term in DDD and matching class diagram

I m trying to learn how to make my code better. This way, I try to learn some books and understand them. I m having some troubles dealing with Domain Objects. From the first year of my IT school, I'...
1
vote
1answer
1k views

How to represent two way composition between two classes in UML class diagram

If class A has many of class B and class B has many of class A, should we place a diamond on both sides of the line between them? Like in the picture below, or is it fine to just indicate the amount ...
1
vote
1answer
251 views

How does maven internally manage package dependency?

Can some let me know how does maven internally manages package dependency? Is there any architecture diagram available on the net for the same? I also asked this in Quora and maven user mailing list ...
1
vote
0answers
205 views

Shared pointers across threads in UML for class and sequence diagrams

How does one represent shared pointers across threads in UML for class diagrams and sequence diagrams? I especially want to document the ownership of the memory even though it's accessibility (a ...
0
votes
0answers
214 views

UML Class Diagram for Simple Trip System

I need to design a simple trip class diagram capturing the following details. I'm not an expert in modeling so I just wanted to ask if the model is approriate. It should capture following details: A ...
2
votes
3answers
821 views

How to represent the following scenario in a class diagram?

Consider a store with multiple branches and a system generates reports for each branch monthly and annually and an overall report as well monthly and annually. So in total there are 4 types of ...
4
votes
2answers
844 views

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 ...
2
votes
1answer
762 views

Class diagrams and frames

UML class diagrams (1st pic) and frames (which belong to knowledge representation and artificial intelligence) (2nd pic) look pretty alike. But do class diagrams exactly type of frames or they just ...
1
vote
1answer
1k views

Visibility notation in UML class diagrams

I'm reading about UML class diagrams and notation for visibility, and I can't tell if this book (Learning UML 2.0 by Russ Miles) has a typo or is just not explaining itself. Consider these two ...
4
votes
1answer
2k views

How to correctly draw a UML class diagram with fully qualified association?

Given the following code I have to draw the corresponding class diagram: public class Shop { List<Client> clients; Storage store; User chief; Set<Invoice> invoices; } ...
1
vote
1answer
529 views

Why do you reduce multiple inheritance to the diamond problem?

Whenever I read something like this: Many programmers exhibit a slight, involuntary shudder whenever multiple inheritance is mentioned. Ask them to identify the source of their unease and they ...
0
votes
1answer
332 views

What is the UML idiom for classes that are too big to fit into one box? [duplicate]

I am documenting an existing system using UML 2, and a few of the classes are too big to comfortably fit into a single class box. So far, I've resorted to breaking up the class into multiple boxes ...
0
votes
2answers
334 views

What kind of design diagram is this?

Here is a kata for the Bowling Game problem. Slide 9 (below) shows a design diagram. But its not obvious to me which box is a class and which is a property or method from the makeup of the boxes ...
0
votes
1answer
1k views

Multiplicities and ternary relations in UML and ER

With entity–relationship diagrams, there are two conventions of denoting multiplicities, (I) and (II): Say, a teacher T is giving ‹G› some lectures L. Then we can either write this as 1 ...
2
votes
3answers
2k views

How do I show 'creates' in a UML class diagram?

Let's say my code is going to look like this: public class MyController { private Foo foo; private FooGenerator fooGen; //setters public void work() { this.foo = this....
1
vote
1answer
749 views

UML diagram for attributes that can have two different types

I have been to an interview for a financial programming job, and I could not answer to one question for sure. I thought about it again, but I really cannot find a good answer. They asked me to design ...
1
vote
2answers
616 views

Can a UML class diagram show two different relationships between two classes?

I have a class which has an inner (nested) class. I have shown this relationship between the two classes in my class diagram. However, I am also using the inner class within the outer class... do I ...
1
vote
1answer
330 views

How to show link between a java class which gets JSON data from PHP script

I am trying to show the relationship that a java class has with a PHP script. The PHP script gets data from a database and then converts it into JSON format. This is then read by the java file. In my ...
2
votes
1answer
4k views

How can attributes/annotations be illustrated on a UML class diagram?

Many programming languages offer a way to annotate types. For instance, in .NET this can be achieved by deriving a custom attribute class from System.Attribute and then annotating another type with ...
1
vote
1answer
303 views

Inheritance vs Class Diagram [closed]

What is the difference between an inheritance diagram and a class diagram in UML? For the Computer Science A Level (a British test administrated by Cambridge University, so it's possible that this ...
1
vote
1answer
2k views

How to represent a multiple choice attribute in UML class diagram?

I'm modelling a Filter class that stores the options for filtering a search. Some of the attributes are multiple choice. For example, if you are filtering hotel rooms you have a Price attribute that ...
2
votes
2answers
985 views

Confusion about associations in UML class diagram

--------------------- ---------------------- | FLIGHT | | STEWARD | --------------------- ---------------------- | Arrival time | | Steward ID | | ...
1
vote
2answers
244 views

My class diagram needs to model a relationship with varying quantities

I am trying to design a restaurant ordering system in UML, which should also include the stock system. One of the classes is a Dish (i.e. a dish on the menu), and another is an Ingredient. My ...
2
votes
1answer
521 views

How to manage coupling in model classes

I'm doing a class diagram for a game project, but I'm stuck on a coupling problem. Context The projet is a turn-based game. Two users are playing. They've got units on a map. They play until 1 ...
1
vote
1answer
389 views

Finding methods of classes from the use case

I know some nouns in the use case scenario are candidate to be class, for example member, customer, student .... I can find such entities and some attributes of them, but my problem is that I can't ...
1
vote
1answer
1k views

How would you draw this UML class diagram?

I'm currently trying to learn UML but I have trouble with this one. Lets say you have a container with cards, a container with players, and that player has also cards. How would you draw this in a ...
0
votes
3answers
105 views

Should foreign keys be represented directly when mapping database tables to classes? [closed]

Ok, in my database I have a table Event and a table Room. Each Room can have many Event. Room table roomID-roomName 1 - cafe102 ... Event table eventID- Time -type -roomID 1 - 11:20 - 1 -...