uc 12 - yshehab/SchoolRoomBooking GitHub Wiki
Collection<Permit>
getPermits(Organization anOrganization)
Given: The Organization object, organization6
- Access the collection of Permit objects linked to organization6, which in this case is {permit5, permit23, permit37}.
- Return {permit5, permit23, permit37}
If Collection <Permit>
is empty then return an empty collection
- none new
- none new
Collection<Permit> permits
-
Collection
<Permit>
getPermits() -
Post-Condition: returns a collection of all the linked Permit objects
-
Permit newPermit(Member aMember)
-
Post-Condition: The organization records a reference to the returned permit
- None
Collection<Permit> getPermits(Organization anOrganization)
- Post-Condition: returns a collection of all Permit objects linked to anOrganazation
- none new
- In use case 1 (Create permit) the creation of a new permit should now also result in a organization1 recording a reference to permit7
- Organization has a newPermit(Member aMember) method which will also need to add the new permit to its collection of Permits.