uc 12 - yshehab/SchoolRoomBooking GitHub Wiki

12. View permits and their details for a given organization

Coordinating method

Collection<Permit> getPermits(Organization anOrganization)

Object diagram for a typical scenario.

Walk-through for this scenario

Given: The Organization object, organization6

  1. Access the collection of Permit objects linked to organization6, which in this case is {permit5, permit23, permit37}.
  2. Return {permit5, permit23, permit37}

Sequence diagram for this scenario

Notes on alternative scenarios

If Collection <Permit> is empty then return an empty collection

Updates to implementation model

Classes

Class Permit

Links
  • none new
Methods
  • none new

Class Organization

Links
  • Collection<Permit> permits
Methods
  • 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

Class LettingCoord

Links
  • None
Methods
  • Collection<Permit> getPermits(Organization anOrganization)
  • Post-Condition: returns a collection of all Permit objects linked to anOrganazation

Navigations

  • none new

Discussion

  • 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.
⚠️ **GitHub.com Fallback** ⚠️