Re: What's the Criteria for Promoting a "Thing" to a Class



mySpamB8@xxxxxxxxx wrote:

I'm an OOAD noob, and I'm thinking that "State" (as in the "S" of the
U.S.A.) qualifies as a class, and should be represented as a Class in
my Class Diagram, with its two properties: name and abbreviation.

Similarly, I think that any type of lookup (in DB ERD terms) should be
modeled as a Class in the class diagram.

My colleague is of the opposite opinion, and thinks that there
shouldn't be classes for these "lookups."

In order to know, ask yourself, what responsibilities do objects of the
class have? If you can come up with an some, then it should be a class,
otherwise it is nothing but data associated with some other class.

Depending on the language, we may represent something that doesn't fit
the definition of class by OO standards as a class in the language,
simply because it is useful to do so. Such data bundles are used by OO
classes to get work done.

It is important not to confuse representational models with OO models.
.