uc 13 v2 - yshehab/SchoolRoomBooking GitHub Wiki

13. View all bookings for a given permit.Version 2

TO DO - revise

Coordinating method

Collection<Booking> getBookings(Permit aPermit)

Object diagram for a typical scenario.

Walk-through for this scenario

Given: The Permit object, permit6

  1. Access the collection of Booking objects linked to permit6, which in this case is {booking7, booking45, booking4}.
  2. Return {booking7, booking45, booking4}

Sequence diagram for this scenario

Notes on alternative scenarios

None

Updates to implementation model

Classes

Class Permit

Links
Collection<Booking> bookings
Methods
Collection<Booking> getBookings()

Post-condition: returns a collection of all linked Booking objects

Class LettingCoord

Links

None

Methods
Collection<Booking> getBookings(Permit aPermit)

Post-condition: returns a collection of all Booking objects linked to aPermit

Navigations

None

Discussion

  • Not specified what details are required to be displayed about the permit. This may change the specification?
  • Should Collection<Booking> bookings be implemented as a HashSet?
⚠️ **GitHub.com Fallback** ⚠️