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 votes
1 answer
65 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 ...
user avatar
1 vote
1 answer
66 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 ...
user avatar
  • 11
3 votes
2 answers
110 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 ...
user avatar
  • 300
1 vote
1 answer
55 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); } }...
user avatar
  • 300
3 votes
2 answers
133 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 ...
user avatar
  • 139
-1 votes
2 answers
86 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>> ...
user avatar
  • 11
0 votes
1 answer
42 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,...
user avatar
  • 101
0 votes
0 answers
54 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 ...
user avatar
  • 300
1 vote
1 answer
57 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 ...
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 ...
user avatar
1 vote
4 answers
92 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 ...
user avatar
  • 339
1 vote
2 answers
137 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 ...
user avatar
  • 21
-2 votes
2 answers
185 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 ...
user avatar
-2 votes
1 answer
156 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
user avatar
0 votes
1 answer
163 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 ...
user avatar
  • 109
-2 votes
1 answer
244 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 ...
user avatar
  • 109
0 votes
1 answer
87 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 ...
user avatar
  • 11
1 vote
1 answer
103 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 ...
user avatar
-1 votes
1 answer
46 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 ...
user avatar
-2 votes
1 answer
107 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 ...
user avatar
-1 votes
1 answer
52 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 ...
user avatar
  • 162
2 votes
2 answers
223 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....
user avatar
  • 123
2 votes
2 answers
322 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 ...
user avatar
2 votes
6 answers
1k 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 ...
user avatar
  • 139
0 votes
1 answer
204 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 ...
user avatar
  • 177
0 votes
0 answers
1k 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 ...
user avatar
0 votes
0 answers
169 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
53 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>...
user avatar
  • 151
6 votes
1 answer
915 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 ...
user avatar
1 vote
1 answer
371 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,...
user avatar
-1 votes
2 answers
118 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 ...
user avatar
-2 votes
2 answers
363 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?...
user avatar
-5 votes
1 answer
1k 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 ...
user avatar
  • 105
2 votes
2 answers
74 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 ...
user avatar
-10 votes
1 answer
109 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 ...
user avatar
  • 103
0 votes
3 answers
385 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/...
user avatar
  • 103
-2 votes
1 answer
409 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 ...
user avatar
  • 105
2 votes
1 answer
744 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 ...
user avatar
  • 23
1 vote
2 answers
94 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 ...
user avatar
  • 137
1 vote
2 answers
254 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. ...
user avatar
  • 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 ...
user avatar
-4 votes
1 answer
498 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 ...
user avatar
0 votes
0 answers
157 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 ...
user avatar
  • 101
0 votes
2 answers
2k views

What is the difference between a qualified association and an association class and how to choose between them?

In UML 2.0, there are two ways of representing an association between classes which I can't seem to distinguish between. First of all, there is the qualified association, represented as such: You ...
user avatar
-1 votes
2 answers
1k views

Needs to understand the difference between boundary, controller, logical class types

As the title implies I am trying to understand the difference between boundary, controller and logical class types, which are used in the MVC pattern. I will do so using an example. Please consider ...
user avatar
4 votes
6 answers
884 views

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 (...
user avatar
  • 373
0 votes
2 answers
229 views

Simple Poker Simulation - How to design it well

I trying to create a little poker Texas Holdem simulator .. In my solution have some class : Premise : I know about Fisher Yates algorithm. I will implement it later Keep in mind that the next ...
user avatar
  • 17
3 votes
2 answers
423 views

How to improve this class diagram of a system with its components

So I was given a task of making a class diagram for a bicycle. I know what a class diagram is and the concepts behind one. The requirement is that the bike can brake, turn or speed up. Now to me, a ...
user avatar
2 votes
3 answers
1k views

Is it possible to omit things in the class diagram [closed]

I'm writing documentation for a school java project I'm working on. Basically have chunked most of the methods into the class diagram, but now it seems very unreadable on a pdf as the words are too ...
user avatar
-1 votes
2 answers
4k views

is my UML use case and class diagram correct? [closed]

So I am very new to creating design diagrams. I have a scenario where a user who is an admin of pizza hut selects registration option and the system prompts them to enter customer details. Upon ...
user avatar