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

Is there a way to solve this circular dependency? [closed]

I'm currently building a fitness tracker. When making a class diagram I'm encountering a ciruclar dependency. A user can create Templates with Excercises that needs to be done A user can start a ...
2 votes
1 answer
76 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
65 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
176 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-...
  • 31
-2 votes
1 answer
99 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 ...
  • 13
-1 votes
1 answer
71 views

Object Diagram help [closed]

I'm making an object diagram. This is based on a random time during a Cataract Surgery, which is when surgeon replace a lens in your eye. Students are observing the surgery through VR. The basis of ...
1 vote
2 answers
134 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/...
-1 votes
1 answer
90 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 ...
1 vote
1 answer
115 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 ...
  • 11
3 votes
2 answers
304 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 ...
  • 311
1 vote
1 answer
64 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); } }...
  • 311
3 votes
2 answers
203 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 ...
  • 139
-1 votes
2 answers
90 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>> ...
  • 11
1 vote
1 answer
56 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,...
  • 113
0 votes
0 answers
199 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 ...
  • 311
1 vote
1 answer
135 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 ...
  • 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 ...
1 vote
4 answers
104 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 ...
  • 339
2 votes
2 answers
181 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 ...
  • 31
-2 votes
2 answers
212 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 ...
-2 votes
1 answer
380 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
0 votes
1 answer
395 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 ...
  • 109
-2 votes
1 answer
630 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 ...
  • 109
0 votes
1 answer
181 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 ...
  • 11
1 vote
1 answer
174 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 ...
-1 votes
1 answer
105 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 ...
-2 votes
1 answer
113 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 ...
-1 votes
1 answer
54 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 ...
  • 162
2 votes
2 answers
454 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....
  • 123
3 votes
2 answers
672 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 ...
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 ...
  • 139
0 votes
1 answer
547 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 ...
  • 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 ...
0 votes
0 answers
261 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
56 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>...
  • 151
6 votes
1 answer
2k 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 ...
1 vote
1 answer
553 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,...
-1 votes
2 answers
187 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 ...
-1 votes
2 answers
608 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?...
-5 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 ...
  • 105
2 votes
2 answers
84 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 ...
-10 votes
1 answer
127 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 ...
  • 103
0 votes
3 answers
665 views

How to find design defects by using a class diagram? [closed]

What are the design defects that can be spotted by using a class diagram, and how? I am not concerned about syntactical/ representational defects, but in things like the following: Do the classes/...
  • 103
-2 votes
1 answer
567 views

Class diagram for permissions

I have this class diagram exercise in UML. The main problem was the permissions are the works, which I did not know very well how to model it. The specification says: Users can publish their work ...
  • 105
2 votes
1 answer
1k views

How to visualise multiple similar classes in an UML class diagram?

My question is about an "edge case" of the UML class diagram. In particular, I have loads (about 30) classes that implement an interface. They can be split into two groups of similar classes. Within ...
  • 23
1 vote
2 answers
100 views

Class-diagram dependencies between classes

Can requirements be expressed in class-diagrams? For example: A student can enroll in a class. There are different classes. Some classes have dependencies, e.g. you can't go to Spanish III before ...
  • 137
1 vote
2 answers
345 views

Combined Inheritance and Composition

Let's say you have a wireless network that acts as a bridge/wireless repeater. How would both factor into a class diagram? In my mind it makes senses to have a parent object that can exist on its own. ...
  • 21
3 votes
1 answer
1k views

How can I provide a class diagram for a system that contains creation of an object that contains a combination of property?

I am designing a system that contains organizational hierarchy management. There are four roles in the system which are the user, admin, manager and head of procurement: I am trying to let the ...
-4 votes
1 answer
520 views

Where to put the server in my Messaging System UML diagram?

I try to design a client application for a messaging application. The client can send and receive messages, the client can connect/disconnect. My problem is that I don't know how to incorporate the ...
0 votes
0 answers
190 views

CK Metrics - Lower Complexity by Refactoring

I'm suppose to identify 3 CK metrics and the most appropriate class to refactor so as to increase encapsulation, modularity and reduce the complexity of the following project According to my ...
  • 101