0% found this document useful (0 votes)
3 views3 pages

J OOPs Assignment

The document outlines the methods for managing books and users in a library system, detailing the functionalities of the Book and User classes. It includes methods for retrieving book and user information, managing book availability, and handling book borrowing and returning processes. Additionally, the Library class provides methods for adding books, searching, displaying, and registering users, along with managing book issuance and returns.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views3 pages

J OOPs Assignment

The document outlines the methods for managing books and users in a library system, detailing the functionalities of the Book and User classes. It includes methods for retrieving book and user information, managing book availability, and handling book borrowing and returning processes. Additionally, the Library class provides methods for adding books, searching, displaying, and registering users, along with managing book issuance and returns.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

o

o
o

o
o

o
o
o

o
o
o






Book Management Methods (Book Class)

• public String getBookId() { return bookId; }


• public String getTitle() { return title; }
• public String getAuthor() { return author; }
• public boolean isAvailable() { return isAvailable; }
• public void setAvailability(boolean status)

User Management Methods (User Class)

• public String getUserId() { return userId; }


• public String getName() { return name; }
• public int getBorrowedBooks() { return borrowedBooks; }
• public void incrementBorrowedBooks() { borrowedBooks++; }
• public void decrementBorrowedBooks() { borrowedBooks--; }

Library Class Main Functionalities

• public void addBook(Book book) { books.add(book); }


• public Book searchBookByTitle(String title) { ... }
• public Book searchBookByAuthor(String author) { ... }
• public void displayBooks() { ... }
• public void registerUser(User user) { users.add(user); }
• public boolean issueBook(String userId, String bookId) throws BookNotAvailableException,
BorrowLimitExceededException { ... }
• public boolean returnBook(String userId, String bookId) { ... }
• public static int getTotalBooks() { return books.size();



o
o
o







You might also like