Library is an important aspect of any educational institute. A library is controlled by a librarian. Apart from
librarian there should be minimum of 4 library staff members. A library should contain books on at least 10
different subjects like English, IT, Chemistry etc. Library can have either faculty members or students as teaching
members. Librarian can issue books to both member types. However, a student can get a maximum of three books
at a time while a faculty member can get a maximum of 6 books. Librarian has to enter details in library register.
domain model
Share
Click on the attachment link below to download the Diagram file.
1. Library – Librarian Relationship:
The “Library” class contains a “librarian” attribute, indicating that a library has a librarian.
2. Library – Staff Relationship:
The “Library” class has a “staffMembers” attribute, indicating a composition relationship with the “Staff” class. This suggests that the staff members are part of the library.
3. Library – Book Relationship:
The “Library” class has a “books” attribute, indicating a composition relationship with the “Book” class. This suggests that the books are part of the library’s collection.
4. Librarian – Book Relationship:
The “Librarian” class has a method “issueBook(Book)” and is expected to interact with books, representing an association.
5. Member – Book Relationship:
The “Member” class has methods “borrowBook(Book)” and “returnBook(Book),” indicating an association with books.
6. Member – Subject Relationship:
The “Member” class may have an interest in certain subjects, represented by the “Subject” class. This relationship is not explicitly shown in the model, but it can be inferred based on the “Subject” class’s association with books.
7. Book – Subject Relationship:
The “Book” class has a “subject” attribute, representing an association with the “Subject” class. This indicates that a book is related to a particular subject.