-
Notifications
You must be signed in to change notification settings - Fork 2
Domain Model
Saagar Arya edited this page Nov 9, 2021
·
2 revisions
- Each account type (patron, librarian, head-librarian) is a distinct class to avoid confusion and to allow for easier scalability if additional functionality were to be added in the future.
- Each time/date dependent class (Shift, LibraryHour, RoomBooking, ItemReservation) is a generalization of the abstract class TimeSlot so that the all have its attributes
- ItemReservation is one class that also includes the period of time when the item is checked out. As soon as a patron reserves an item, the item’s return date is set, regardless of when the customer checks out the item.
- There is an abstract “Item” class as the different types of items share a lot of common attributes and methods. As well, if the library begins stocking adding additional types of items, adding them into the system will be straightforward as each item type is a distinct sub-class class of “Item”.
- RoomBooking has a unidirectional association with Patron and Room so that a booking cannot exist without an associated patron and room.
- Bidirectional associations were avoided as much as possible to decrease redundancy.