Skip to main content

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.

Filter by
Sorted by
Tagged with
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 ...
Simon's user avatar
  • 113
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 ...
Sierra's user avatar
  • 39
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 ...
John adams's user avatar
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 ...
Kyohei Kaneko's user avatar
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 ...
Roman's user avatar
  • 7
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 ...
Tunahan's user avatar
  • 31
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) { ...
user32882's user avatar
  • 267
-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 ...
João Vitor Gomes's user avatar
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 ...
Sena's user avatar
  • 19
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 ...
user32882's user avatar
  • 267
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 ...
Luca Pedersoli's user avatar
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 ...
emcosokic's user avatar
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-...
Nordin's user avatar
  • 31
-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 ...
SSSOF's user avatar
  • 13
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/...
Edgar Alloro's user avatar
-1 votes
1 answer
147 views

Confusion with class diagram question

There was this question on my mock and I am just really confused about it. I tried to learn about class diagrams in more detail but there was no information that explained to the detail of the ...
jasmineoverflow's user avatar
1 vote
1 answer
198 views

UML arrowhead confusion

The answer to this question is A however I can't wrap my head around how there is a inheritance given the only information is the quote below (ie. a player is not a kind of team). It would make more ...
moo's user avatar
  • 11
4 votes
2 answers
1k views

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

I'm drawing the class diagram that depicts the domain model of a system. This diagram is for requirements analysis purposes so it is completely implementation-agnostic. I want to communicate the ...
cidra's user avatar
  • 343
1 vote
1 answer
82 views

How to represent CDI interceptors in class diagram?

I have the following classes: public class MyCaller{ @Inject private MyService service; private void callerMethod(int arg1, String arg2){ service.serviceMethod(arg1, arg2); } }...
cidra's user avatar
  • 343
3 votes
2 answers
522 views

Where do methods in class diagrams come from?

In a class diagram, how do I know what methods to add? I’m not sure what the connection is between methods and other (i.e. Activity and User Case) diagrams. My guess is that methods can come from ...
ltrainpr's user avatar
  • 139
-1 votes
2 answers
164 views

Is an abstract role needed to ensure that a customer can only have one role out of several? [closed]

I have the following UML class diagram in a C++ context. I want to make sure that a Customer can have only one role: Can the Customer now only assume one role, and what does <<abstract>> ...
Seonix's user avatar
  • 11
0 votes
2 answers
743 views

ER Diagram - How to display relationships between Entities that are a type of another

I face a problem in understanding how this situation can be traduced to an ER diagram. So I have an entity, let's call it car, and then, there are another entities, that are a type of car. For example,...
S. Dre's user avatar
  • 111
0 votes
0 answers
510 views

Drawing a sequence diagram for a "View posts in a section" use case

As title says, I'm currently working on an alaysis model for a little website similar to Reddit for academic purposes. I have one use cases written like this (They're not in English so they may not ...
cidra's user avatar
  • 343
1 vote
1 answer
402 views

ECB and multiple similar views

My teacher told me that in the entity-control-boundary we need to create a boundary class for each view of mock-up but I can't really understand if this is always true. For example if i have a mock up ...
Ansol's user avatar
  • 13
1 vote
1 answer
66 views

Videotape copy as an attribute or Class

I am going over tutorials regarding class design; in one, a videotape can have multiple copies and each copy can be borrowed by a borrower. Please see figure A: I am trying to understand why the ...
Afia R. S.'s user avatar
1 vote
4 answers
134 views

Class Diagram - Aggregating over a class that has physical presence or logical presence?

In the below figure, a CD shop has CD cupboards, and inside it has shelves. CDs could be rented, and class CD Copy represents the actual CDs that are rented. My question is, should I represent Shelves ...
Melanie A's user avatar
  • 339
1 vote
2 answers
242 views

Connecting classes by passing method references

I am trying to find a good way of allowing two objects that are separated by a intermediate object to communicate while keeping the architecture loosely coupled. A solution I have developed is to pass ...
dda2120's user avatar
  • 21
-2 votes
2 answers
250 views

OOP: How to Manipulate Objects Using ORM Techniques?

about those objects and arraylists inside the classes, derived from one-to-many relationships, using the ORM techniques, what's the best way to deal with them at the time of setters and validation ...
Alex Boorjs's user avatar
-2 votes
1 answer
659 views

Should customer class have the different function or should i include it in account class in my UML class diagram of banking system?

Should i include the different functions of open account, close account , withdraw in the customer class(as shown in the picture) or should i include it in the account class
Moaaz Siddiqui's user avatar
0 votes
1 answer
849 views

Appointments using time slots

I would like to create a dynamic appointment system between teacher and student to easily allow them to make an appointment. In this system, teachers select their 30 minutes time slot availabilities ...
anthonya's user avatar
  • 109
-2 votes
1 answer
932 views

Appointments Booking Using Slots

I'm looking for an efficient way to create appointments between teachers and students. I want teacher to be able of make their students know their availabilities : For example, A Teacher writes on the ...
anthonya's user avatar
  • 109
0 votes
1 answer
487 views

Confused over qualification association in conceptual schema UML

I am getting confused at qualification association. I perform qualification when I need to remove many-to-many relationship or when the PK of a particular table is not able to be uniquely identify a ...
Sunny J's user avatar
  • 11
1 vote
1 answer
488 views

How to represent association classes in a UML component diagram?

Please consider a class diagram and a component diagram as shown below. In the class diagram I use association classes to represent the relationship between two classes (BaseLink and ShoulderLink) as ...
hielsnoppe's user avatar
-1 votes
1 answer
189 views

Designing a class implementing a method which signature types depends on the instance contained

My goal is to define a Service class which process method accepts a RequestType argument that is defined by the contained ServiceType and returns an object of a type defined by ServiceType. By doing ...
Antonio Santoro's user avatar
-2 votes
1 answer
176 views

Achieving loose coupling

My scenario involves the following classes: I have three types of Peer that creates a RegistryType instance because its methods are needed. Same for Identity class. Each PeerType need 0 or all the ...
Antonio Santoro's user avatar
-1 votes
1 answer
57 views

Model design for `Team`s and `Member`s

Say we have to create a model for a company, where employees can be part of many different teams. A team can have member members. Members can be part of many teams. How to design database tables for ...
funct7's user avatar
  • 162
2 votes
2 answers
1k views

How to model relations in UML Class and Object diagram for simple Graph structure

I'm trying to model a simple Graph structure as an UML Class Diagram and Object Diagram. A Graph can have multiple Nodes and knows it's starting Node. Every Node has a predecessor and a successor Node....
Jonas's user avatar
  • 123
3 votes
2 answers
1k views

How to design correctly relationships of class diagrams?

I'm learning OOP so I decided to start a new project, a chess tournament manager. Here you can read about chess tournaments https://en.m.wikipedia.org/wiki/Chess_tournament Basically the user will be ...
user86208's user avatar
2 votes
6 answers
2k views

UML: what is the correct order of steps?

I was reading an old text book "Beginning C# Object oriented programming" from 2011. The author in one case employs the "use case" to identify classes and then goes to draw a class ...
microwth's user avatar
  • 139
0 votes
1 answer
2k views

Inheritance and association relationships in UML

I was creating a class model using inheritance, and have a situation I don't know how to represent. For this question I built an example diagram in which I have a class Person with some attributes. I ...
Caeta's user avatar
  • 177
0 votes
0 answers
2k views

Class diagram of an Hotel Management System

I am given the following system description : Consider a hotel management system to manage a group of 5-stars hotels. If this system is modelled using OOP methodology, and the classes are identified ...
John adams's user avatar
0 votes
0 answers
379 views

Could you help me understand what a problem domain is and how can I build my class diagram based on it?

So I just started studying Software Engineering because I am really interested in it and my professor in London asked us to create an app which is like Instagram (only theoretically, without the ...
user avatar
4 votes
1 answer
78 views

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

In the UML specification 2.5.1 (Link) on page 117 it is specified that the notation of operations (methods) should look like the following: [<visibility>] <name> ‘(‘ [<parameter-list>...
Raphael's user avatar
  • 151
6 votes
1 answer
3k views

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 ...
Tim Engbrocks's user avatar
1 vote
1 answer
2k views

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

I have the following constructor in a class for a code I'm writing an assignment on for school: public Plant(int xPos, int yPos,int width,int height, int hp,String imageLocation,String audioLocation,...
Felix Jönsson's user avatar
-1 votes
2 answers
349 views

How to represent hierarchy in a use case diagram

I need to finish a task in my homework. I need to include a use case diagram. I have the following situation I have a master, admin, manager, seller and attendant users. It is like this, master is the ...
theshadow's user avatar
-1 votes
2 answers
998 views

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

I'm working on a project with 5 different modules. Should I make separate use case diagrams and class diagrams for each module or should I make all-in-one use case diagram and all-in-one class diagram?...
Abdul Hannan's user avatar
-4 votes
1 answer
2k views

Use Case Diagram for Vending machine

I want to create a use case diagram for a vending machine which has the following states: Accepts coins of 1,5,10,25 Cents Allow user to select products Coke(25), Pepsi(35), Soda(45) Allow user to ...
Lee Yaan's user avatar
  • 125
2 votes
2 answers
143 views

Consider as a single class or attribute/operation of existing class?

There are different methods for recognizing classes in UP methodology: noun/verb analysis using CRC analysis using RUP stereotypes other sources I have read above methods fully detailed in UML 2 and ...
Mostafa Ghadimi's user avatar
-10 votes
1 answer
153 views

Find design issues via a class diagram? [duplicate]

Given a class diagram , how can we find design issues in it. I am not talking about the relationships it should be representing as they exist in the real world but i am talking about design issues ...
Sheikh's user avatar
  • 103