Types, Implementation Classes, and Interfaces

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:

  • Types

  • Implementation classes

  • Interfaces

These differentiated classes closely relate to different activities in the development process. The next few sections discuss these differentiated classes.

Types

A type is a class that may have attributes, 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 Worker 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.

Types

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 ...

Get Learning UML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.