uc 14 - yshehab/SchoolRoomBooking GitHub Wiki

14. View accounts and their details for a given organization

Coordinating method

Collection<Account> getAccounts(Organization anOrganization)

Object diagram for a typical scenario.

/images/use_case_14_object_diagram.jpg

Walk-through for this scenario

Given: The Organization object, organization34

  1. Access the collection of Permit objects linked to organization34, which in this case is {permit3, permit45}.
  2. Create a new empty collection, results.
    For each Permit object accessed in step 1:
  3. Access it_s collection of Account objects
  4. Add each Account object to results
  5. Return results

Sequence diagram for this scenario

/images/use_case_14_sequence_diagram.jpg

Notes on alternative scenarios

If an Organization is not linked to any Permit objects, or it_s linked Permit objects are not linked to any Account objects then return an empty collection

Updates to implementation model

Classes

Class Permit

Links
  • none new
Methods
  • Collection<Account> getAccounts()

Class Organization

Links
  • Collection<Permit> permits
Methods
  • Collection<Account> getAccounts()
  • Post-Condition: returns a collection of all the Account objects linked to the linked Permit objects

Class LettingCoord

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

Navigations

  • Organization to Permit

Discussion

⚠️ **GitHub.com Fallback** ⚠️