uc 16 - yshehab/SchoolRoomBooking GitHub Wiki
public void addMemberToOrganization(Member aMember, Organization anOrganization)
Given: The Member object, member6 and the Organization object, organization45
- Check if member6 is linked to organization45.
As member6 is not linked to organization45:
- organization45 records a reference to member6
If Member is already a member of the organization, do nothing
Collection<Member> members
void addMember(Member aMember)
- None
public void addMemberToOrganization(Member aMember, Organization anOrganization)
- isMemberOf from Organization to Member
Probably could do without the Boolean return and have the UI only allow selection from organizations the member is not already a member of.
Where can an existing Member be selected from within the UI?
The options are:
- From all other Organizations - would need a public method to select all organizations -> all members.
- From all Schools - ditto - all Schools -> all members.
- From everywhere - ditto - Set of both of the above - a bit of a monster.
- Manually by the user picking a school -> Member &/or Organization -> Member.