
π Student Projects (College Reports) Β· Class UML
The main classes of a library system with attributes, methods and UML relationships.
Drawing diagramβ¦
Class diagram for a library management system: Book (isbn, title, authors) has many BookCopy objects; Member is a base class with StudentMember and FacultyMember having different borrow limits; Loan links a Member to a BookCopy with issue, due and return dates and calculates the fine; Librarian issues and returns loans; Catalogue searches books.
classDiagram
class Book {
+String isbn
+String title
+List~String~ authors
+availableCopies() int
}
class BookCopy {
+int copyId
+String status
+markIssued() void
+markReturned() void
}
class Member {
<<abstract>>
+int memberId
+String name
+String email
+borrowLimit() int
}
class StudentMember {
+String rollNumber
+borrowLimit() int
}
class FacultyMember {
+String department
+borrowLimit() int
}
class Loan {
+Date issueDate
+Date dueDate
+Date returnDate
+calculateFine() decimal
}
class Librarian {
+int staffId
+issueBook(Member, BookCopy) Loan
+returnBook(Loan) void
}
class Catalogue {
+search(String query) List~Book~
}
Book "1" *-- "many" BookCopy
Member <|-- StudentMember
Member <|-- FacultyMember
Member "1" --> "many" Loan
Loan --> BookCopy
Librarian ..> Loan : creates
Catalogue o-- BookWho uses a college library system and what each of them can do: members, the librarian and the system administrator.
The database of a library system: books and their copies, authors, members, loans, reservations and fines, with keys and cardinality.
How data moves through a library system: members and the librarian, the main processes, and the data stores they read and write.
The steps when a member borrows a book: checks, loan record and the copy status update.
What students, examiners and the administrator do in an online examination system.
Database design for online exams: courses, exams, questions and options, attempts, answers and results.