This is a class diagram example that shows the use of association class.
Some people have several jobs, but with different employers. For example, at night John is a security guard at Pub 911, where he earns $9/hr and his boss is the club's bar tender. In the day he is a programmer for MicroHard, where he earns $20/hr and his boss is a MicroHard project manager. Where can we store John's salary and boss information?
To solve this problem we can use the Job association class. Now John's security guard job and programmer job are association objects: instances of a Job class. Each instance encapsulates a salary, an employer link, and an employee link. We can represent the Boss relationship as a Job self-association.