Objects relate to each other in different ways — serv-ing, using, and communicating with each other. From the way in which they treat one another, objects have different perspectives of each other. These perspec-tives define the role that an object may play towards another. The perspectives are formed as a restricted set of methods of the object, — exactly the methods that are relevant for the relations between the objects. Different roles exist for different purposes, and the roles played by an object may change over time. The role is a powerful modeling concept in object-oriented analysis, design, and programming. A graphical nota-tion is defined to support static and dynamic descrip-tion of roles. The notation supports generalization and part-whole hierarchies for roles, the extension of methods and active objects with roles, and the inte-gration of roles and locality.
展开▼