UML - Class Diagram

Asked

Viewed 137 times

1

Hello,

I started to study the UML diagrams recently and I had a question about how to know who the objects.

My question is, what’s the best way to identify an object? Because a class can be either a noun (Client) or an action (Register Client). From now on, thank you.

1 answer

3


You should analyze not by the classes you create in your program, but by what the classes will manipulate, remembering that the objects are different from the classes:

  • An object needs a class to exist;
  • A Class does not need an object to exist;

A known definition is: "An object is a term we use to represent a real-world entity".

The objects should be in your diagram, as they will have their attributes and will be manipulated according to your need for business rules.

Following the line of thought cited by you in the question, a system that has Client and registersClient, Employee and registersFunctionary, will have as entities the Client and Employee, because they are the entities of the "real world".

In this link you will find more on this subject: http://www.macoratti.net/net_uml1.htm

Browser other questions tagged

You are not signed in. Login or sign up in order to post.