Association Class and Self Association

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.

Import into your Project

Posted by: Brittany Shook

Turn every software project into a successful one.

Try Visual Paradigm for Free! Or learn more about our features.

0 0 vote
Article Rating
guest
0 Comments
Inline Feedbacks
View all comments