This method is proposed in Object Modeling in Colour, Java Modeling in Color with UML.
Define four types of prototypes, and use different colors to represent objects of different prototypes in UML
1. Party, Place, Thing
Party: Participants of an event, such as a person or organization
Place: the Place where the event occurred, such as warehouses and retail stores.
Thing: Thing classes are those that identify individual items such as individual cars, airplanes, DVD's, books, pieces of equipment, etc.
Literally, it should refer to the specific items in the event. For example, in the customer's purchase event, thing may not refer to order, but to the specific items in the order, books, clothes, etc.
2. Role, Role, abstraction of activities and methods involved in party, place, and thing
3. Moment-Interval
Models something that one needs to work with and track for business and legal reasons, something that occurs at a moment in time or over an interval of time.
Business activities, objects, and other things that need to be operated, recorded, and tracked due to business needs and legal reasons, such as sales, orders, reservations, flights, meetings, and itineraries
4. Description
Additional description data of a certain type of thing. For example, a product has various basic attributes, but different types of products are quite different. For example, when using an e-commerce system, books, clothing, glasses, and other types of products, there are big differences in the front-end purchase process, back-end order processing process, financial accounting processing, inventory management methods, after-sales service principles, and other aspects, these differences are designed as additional product description attributes based on the product type. These are called descriptions.
The effect is that when you see the product main object, you can clearly know what it represents, and other ancillary materials are in description. In most cases, the basic attributes of a product are used. You only need to care about the primary object of the product, and the description-related data needs to be concerned only when differential processing is involved. Therefore, it is divided into different prototype and represented in different colors.
Different prototypes
1. Different colors are used in the UML diagram to facilitate understanding of complex UML diagrams.
2. Have their respective responsibilities
3. There may be some commonalities, such as the same attributes, operations, and relationships among others. At least these aspects should be considered during design.
Refer:
Object Modelling in Colour