Class - modelint/shlaer-mellor-metamodel GitHub Wiki

“A class is an abstraction from a set of conceptual entities in a domain so that all the conceptual entities in the set have the same characteristics, and they are all subject to and behave according to the same rules and policies.” MB

A Class is represented symbolically on a Shlaer-Mellor class diagram as a rectangle with separate rectangular compartments for a name, attributes and other model properties.

images/class-attribute-subsystem/class-10.png

Identifiers

  1. Name + Domain
  2. Cnum + Domain

Attributes

Name

This is the name that appears inside the top compartment of a class rectangle on a class diagram. Naturally, the name may appear many other places. It should be descriptive relative to the domain subject matter.

Type: Class Name, based on Name

Cnum

Class numbers are part of the original Shlaer-Mellor specification. In practice, they may have little value in which case they can be hidden.

A number of the form Csuch asC1, C2, ...`. A numbering range is established for each Subsystem.

Type: Class Number, based on Nominal

A type specific Number() operation can be defined on Class Number to extract the numeric component for those who wish to display classic Shlaer-Mellor class numbering.