Association Class and Self Association

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.

Leave a Reply

Be the First to Comment!

avatar