문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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.

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top