The kinds of classes discussed thus far are known as undifferentiated classes, and are commonly used during design activities within a development process. You can also differentiate between three different kinds of classes, called differentiated classes. These include:
These differentiated classes closely relate to different activities in the development process. The next few sections discuss these differentiated classes.
A type is a class that may have
associations, and operations, but does not have any methods. A type
defines a role an object may play relative to other objects, similar
to how a rolename indicates the role a class plays relative to other
classes in an association. For example, a
object may play the role of a project manager, resource manager,
human resource, or system administrator. A type is shown as a class
marked with the
type keyword. These types of
workers are shown in Figure 3-25.
Figure 3-25. Types
Types are commonly used during analysis activities within a development process to identify the kinds of objects a system may require. You can think of types as conceptual classes, because they are ideas for possible classes. Also, because types do not have methods and represent roles only, they do not have instances.
Types may be used with binary and n-ary ...