user3316752
user3316752

Reputation:

What UML relation should I use between these two classes?

I have a class called "EventManager" and one called "Event". From Eventmanager I can created and store events in a linkedlisted, which then is stored in a hashmap together with "persons" who attend these events. Now, which relationship(UML) between Event and Eventmanager?

Upvotes: 0

Views: 84

Answers (3)

Kiran
Kiran

Reputation: 129

I also think it is HAS-A relationship as EventManager class has Event class as its data member.

Simple association will not suffice in this case.

Upvotes: 0

Vladimir
Vladimir

Reputation: 2119

Use simple association. EventManager is not composed of Events. It only provide list of events to process. Another association would be created between event and person.

Upvotes: 0

Luis Alves
Luis Alves

Reputation: 1286

I think it's an HAS-A. Since EventManager contains Events.

Upvotes: 1

Related Questions