Class dialog box

 

Classes

A class represents a pattern for an object's creation.

 

A class has an extended description in a model.  For example, enumerates are classes in the general sense, but are not developed in a model.  A class represents its instances, and has operations and attributes.

 

Classes can have dependency links between them, and also support generalization links and associations.

 

A class can be:

·         "abstract": This means that it cannot have direct instances.

·         "leaf": This means that it cannot be re-decomposed.

·         "root": This means that it specializes no other classes, except "Object".

·         "primitive": This means that its value cannot be decomposed.  It can then be used as a type of attribute.

·         "main": This means that it represents the application.

·         "active": This means that the class can receive events, be multithreaded, or have specific active behavior.

·         "public" or "private": This defines the visibility of this class from outside the package.

 

The "Class" dialog box contains four tabs - "Properties", "Notes", "Tagged values" and "Stereotypes".  For information on these standard dialog box tabs, please see "Standard dialog box tabs".

 

 

The "Properties" tab of the "Class" dialog box

The "Properties" tab of the "Class" dialog box is used to define values for a class.

 

The "Properties" tab in the "Class" dialog box

 

Key:

·         "Name": This indicates the name of the class.

·         "Abstract": An abstract class is defined very generally, and does not own direct instances.

·         "Primitive": This determines if the class is primitive.  A class is primitive if its value is not de-composable, and if its instances are not managed by the application.  For example, "integer" and "boolean" are primitive classes, whereas "Human" or "peripheral" generally are not.

·         "Leaf": This indicates if the class is a leaf class (a generalizable class with no children in the generalization hierarchy) or not.

·         "Main": A main class is a class whose unique instance represents the application.

·         "Root": This indicates if the class is a root class (with no ancestors) or not.

·         "Active": This indicates if the class is an active class (a class whose instances are active objects) or not.

·         "Visibility": This only applies if a class belongs to a leaf package. The visibility can either be public or protected. A public class is accessible from any user package of the current package. A private class can only be accessed from the current package or by an heir package.