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

1
vote
1answer
38 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
56 views

Confusion about associations in UML class diagram

--------------------- ---------------------- | FLIGHT | | STEWARD | --------------------- ---------------------- | Arrival time | | Steward ID | | ...
0
votes
2answers
49 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
59 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
54 views

Finding Methods of Classes from 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
85 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
90 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
141 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 ...
0
votes
0answers
58 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
73 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
222 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
207 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
160 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 ...
2
votes
2answers
3k 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
134 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
320 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
238 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
139 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
45 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
320 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 ...
1
vote
0answers
116 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 ...
1
vote
1answer
1k 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
506 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
2k 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
104 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
325 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
464 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
162 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
184 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
600 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
312 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
174 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
118 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
253 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
563 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
957 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
207 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
611 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
1k 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 ...
0
votes
1answer
717 views

How can I use UML to model a relationship between two classes, where one has functions exposed as friend to the other?

I have a two classes: ------------ --------------- X Y ------------ --------------- ...
4
votes
2answers
11k views

What does the arrow mean in a Class Diagram?

I need help trying to understand what the meaning of the arrow in a UML Class Diagram is, more specifically in this Composite Diagram. What's the difference between the simple line (from a class to ...
1
vote
2answers
382 views

How show Attributes which appear In Many To Many association

As we know a many to many association are shown by two asterisks in both end of association. Now I have a association between two entities "Good" and "Invoice" so Good and Invoice have a many to many ...
3
votes
1answer
281 views

Graph/diagram editor that works with pseudographics

Is there a graph/diagram editing tool that can output (or even better also parse) pseudographics, that can be easily inserted into source code comments? Like this: +---------------+ | ...
2
votes
1answer
1k views

UML representation of specific factory pattern

I have to create an UML class diagram from the following example code (Perl). I don't think that the standard factory pattern match in my case or I don't understand it correctly. I don't have ...
5
votes
5answers
4k views

How to Model a simple file-system by UML class diagram

I want to model a file system which contains both files and directories, and directories can contain either files or other directories. This is what I have reached so far: In OOSE book, however, a ...
1
vote
4answers
3k views

best way to handle a many to many relationship?

I am drawing a class diagram and I want to know what's the proper notation for many to many relationship between supplier and product? Should I show the table created supplier_product or leave it out ...
-1
votes
0answers
49 views

Best way to handle product and supplier relationship [duplicate]

Possible Duplicate: best way to handle a many to many relationship? The relationship between product and supplier is many to many with a new class to be created? Or is it many to 1?
4
votes
2answers
2k views

Java code generation from class diagram

I'm on the way developing a Java application where user can provide a class diagram and get the corresponding Java code. I don't know how can I let the user interactively draw a class diagram in ...
0
votes
1answer
80 views

How to link classes in different packages (on different pages)?

Extending the answer to this question, I have broken down a large system into a few classes per package. Each package is now shown in a different page for readability, but now how do I show the ...