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.

learn more… | top users | synonyms

0
votes
0answers
44 views

Good architecture with DI where low-level components can interact with another hierarchy details

What would be a good design for accessing low-level components attached to another parent? Assume each User has its own hierarchy and one low-level class wants to send a message to some low-level part ...
0
votes
2answers
128 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
46 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
158 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 = ...
1
vote
1answer
59 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
123 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
65 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 ...
0
votes
0answers
54 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
100 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 ...
0
votes
2answers
541 views

Different relationships between component and class diagram [closed]

How can I convert association of class diagram to component diagram? For instance what is the equivalent relationship of ->, aggregation and inheritance of UML class diagram to the component diagram? ...
1
vote
1answer
292 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 ...
1
vote
2answers
186 views

Confusion about associations in UML class diagram

--------------------- ---------------------- | FLIGHT | | STEWARD | --------------------- ---------------------- | Arrival time | | Steward ID | | ...
0
votes
2answers
97 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 ...
1
vote
1answer
106 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
81 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 ...
0
votes
1answer
261 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
95 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 ...
1
vote
3answers
213 views

UML Class Diagram: How can I represent “orthogonal” generalizations (or multi-inheritence)?

I try to represent in a UML Class Diagram the following object and features: The Object: A System (e.g. an electronic device) that can be of Type A, B or C If the System is of type A, it has a ...
1
vote
0answers
74 views

MVC class modeling

I have following requirement and I am trying to design class diagram. This is the first time I am creating class diagram so I would like to get some advice from experts.. :) This is a simple login ...
0
votes
1answer
108 views

In UML is it correct to have an association class with a composition or aggregation relationship?

An example of an association class is given here: http://pic.dhe.ibm.com/infocenter/rsarthlp/v9/index.jsp?topic=%2Fcom.ibm.xtools.modeler.doc%2Ftopics%2Fcassnclss.html Composition and Aggregation ...
1
vote
3answers
232 views

What alternative is better to diagram this scenario?

I was creating and discussing a class diagram with a partner of mine. To simplify things, I've modify the real domain we're working on and made up the following diagram: Basically, a company works ...
-4
votes
3answers
1k views

How to inherit from two parent classes [closed]

I have many classes with many relationship I draw Uml that relation between them: Is this relation true and how to implement this?
0
votes
1answer
315 views

I want to draw class diagram, but I don't know how to put server and database inside? [closed]

I just started to draw class diagram, I think it is based on 3-tie architecture. I have mobile application, servers, database, and web interface. But I do not know if it should put the server in? I ...
5
votes
2answers
15k views

UML class diagram notations: Differences between Association, Aggregation and Composition

I'm confused about some of the notations of UML class diagrams. Pretty sure I know what Association means. Any relationship between instances of two classes, where an instance of one class needs to ...
-1
votes
1answer
259 views

Should I label class diagram variables as private or public?

In my program, I have several class variables whose access specifier is known as private package. The default accessor specifier in Java is known as private package where it is accessible within the ...
0
votes
1answer
403 views

My UML class diagram is too complicated, what should I do?

Classes have 10-20 links with one another and you can't see anything in that mess of a diagram Unfortunately we finished coding already and if we change the class diagram we have to redo the whole ...
-1
votes
3answers
354 views

How important is it to learn UML for an OO developer? [closed]

When studying OOP by myself I often encounter UML class diagrams. I understand them, but don't completely know how to write them. Meaning, I don't entirely know what each kind of arrow means, and ...
0
votes
2answers
214 views

UML Class Diagram: Abstract or Interface?

I am modeling a class diagram and have spotted an opportunity to simplify it slightly. What I want to know is, would this it be better to implement an abstract class or an interface? The scenario is ...
0
votes
1answer
64 views

Compatibility between Class Diagram and Sequence Diagram

Do the message being passed between objects in Sequence Diagram match with the methods in Class Diagram?
1
vote
3answers
680 views

Should we include external systems in Class diagram?

I want to draw a class diagram that shows the following for an application: An external content management system that publishes some news items. The class that represents the news item in my ...
2
votes
0answers
143 views

UML diagram for an existing implementation

I have some code, which I want to present in UML, but I've stuck at one point. Let me tell you something about code's functionality. I have a workspace in which I can place some Components, select ...
2
votes
1answer
2k views

What is the difference between UML Data profile and ER model?

I have been asked this question and even after a lot of research, I cannot find the answer. When I design a database using Entity relationship (ER) and then re-draw it as UML class model (extended ...
2
votes
2answers
641 views

Package diagram for an MVC patterned project?

We are required to make a package diagram for our senior project. Since our project uses MVC patter design, we created an MVC class diagram, now, our problem is in creating the package diagrams from ...
0
votes
1answer
3k views

Making Class Diagram for MVC Pattern Project

I have a question about making a class diagram for an MVC based college senior project. If we have 2 actors of users in my system, lets say Undergrad and Graduate students are the children of ...
0
votes
1answer
124 views

Class diagrams - do aggregated/composed classes automatically see each other?

Let's say that in the game, a player has a pet: Player<>------Pet Obviously player can access Pet's fields and methods, but I assume Pet does not know about the player? I need that Pet can access ...
1
vote
1answer
404 views

UML class diagram - can aggregated object be part of two aggregated classes?

Some sources say that aggregation means that the class owns the object and shares reference. Lets assume an example where a company class holds a list of cars but departments of that company has list ...
0
votes
4answers
518 views

Does it make sense to generate java classes from class diagram?

As we do design & analysis before development, wouldn't be convenient to be able to generate Java classes from a class diagram? This would promote more exhaustive design and better codes, right? ...
3
votes
1answer
173 views

How to draw a class diagram where a class contains either 6 other classes or mupltie different

I know the basics but do not how to model this (it is an exercise with no solution provided): An order can contain 1 or more cartons of beer. Each carton contains 6 beers of the same kind but ...
0
votes
2answers
187 views

Subclassing to avoid line length

The standard line length of code is 80 characters per line. This is accepted and followed by the most of programmers. I working on a state machine of a character and is necessary for me follow this ...
3
votes
3answers
689 views

How bad is it to have two methods with the same name but different signatures in two classes?

I have a design problem related to a public interface, the names of methods, and the understanding of my API and code. I have two classes like this: class A: ... function collision(self): ...
0
votes
2answers
332 views

How to indicate that a class might implement an interface?

Say I have a class User and an interface Administrator. Some users are administrator and can thus implement the interface. Most aren't, however, so it's false to say that "User implements ...
2
votes
2answers
218 views

How can I indicate if an object operates with another one in an UML class diagram?

Suppose I want to draw a class diagram of a DAO and an Entity. The DAO is used to load instances of the Entity from the database. How can I represent this relationship on my class diagram? Is this ...
-3
votes
1answer
136 views

How do you call the discipline which consist of making the right choice of language/paradigm/class diagrams? [closed]

As a physicist, I've learnt programming on my own. But I would like to know the name of the discipline (like algorithmics is the discipline of designing algorithms) which consists of : making the ...
5
votes
1answer
360 views

How to display in compositional relationship that the item knows about the container?

I'm drawing a class diagram and noticed that sometimes I got a relationship (composition or aggregation) where the item uses the container, and sometimes not. What is the visual difference in a ...
2
votes
3answers
798 views

What to use in UML for included module in ruby?

I like to create simple class diagrams for my projects. Most of the time I just use composition, inheritence and associations. IMB's basic UML resource tells all about this. However I'm using ruby so ...
1
vote
1answer
2k views

UML Class diagram confusion

I am learning how to draw a UML class diagram and after reading a few tutorials, I am still confused about the appropriate usages of Association type (The clear diamond and black diamond). I ...
1
vote
1answer
247 views

Should dependency relationships always be shown on class diagrams

I recently started using the Object aid UML generator plugin for Eclipse and noticed that by default adding of dependency relationships is switched off. This made me wonder if in most cases they ...
3
votes
5answers
1k views

What classes to put exactly in a class diagram?

What classes must I put in a class diagram? Only classes used in Business Layer and associations between them? Or also other classes in the Data Access Layer, Service Layer, etc.?
0
votes
3answers
709 views

UML - Class Diagrams Order -> Products

I have a class diagram that is like this: < Order > (1) CAN HAVE (M) < products > But therefore Order has the following: Order_Id Customer_Id Order_date_day Order_date_month ...
0
votes
1answer
2k views

Class Design and Structure Online Web Store

I hope I have asked this in the right forum. Basically, we're designing an Online Store and I am designing the class structure for ordering a product and want some clarification on what I have so ...