I am trying to implement an enrollment organizer for a university but I would ask how to implement the aggregation relationship in Java.
this relationship exist for academicStaff class and the supervisor class in which the academicStaff (e.g prof.) can be a supervisor to multiple courses in a specific semester.
I think that I should make a list of supervisors in academicStaf class and an instance of acadmicStaff in the supervisor class.
so I need help to know the best way to implement this relationship.
thx in advance.
creative_m
0
Light Poster
Recommended Answers
Jump to PostIn general, if there is an aggregation relationship "an A has-many Bs" then you can use any member of the Collection hierarchy to hold multiple instances of B as an instance variable of A.
A simple ArrayList<B> is the most obvious choice, but if you want to access those Bs …
All 3 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
creative_m
0
Light Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.