[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-655757-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-655757-en":130},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","library-management-system-java-oop-case-study","Library Management System - Java OOP Case Study","","Java-based Library Management System designed with object-oriented programming principles, covering core class architecture, inheritance hierarchy, interfaces, polymorphism, and exception handling. The system models library items through an abstract LibraryItem with shared attributes and behaviors, extended by Book, Magazine, and Journal variants with distinct late-fee calculations. It also includes Member and Library classes for borrowing, returning, searching, and registering, plus a UML-oriented structural overview and associated source code.",{"@graph":14,"@context":72},[15,34,55],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/library-management-system-java-oop-case-study/655757/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/library-management-system-java-oop-case-study/655757.png","ImageObject",300,407,{"name":42,"@type":43},"cimolpedes","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-10-30","2026-10-25",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is the role of LibraryItem in the system design?","Question",{"text":62,"@type":63},"LibraryItem is an abstract base class that stores shared item attributes and declares common operations like borrow/return, late-fee calculation, item type retrieval, and keyword matching.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How do Book, Magazine, and Journal differ in late-fee behavior?",{"text":67,"@type":63},"Each subclass overrides calculateLateFee(int daysLate) to apply a different multiplier, and each returns its own item type string.",{"name":69,"@type":60,"acceptedAnswer":70},"What custom exceptions are used and when are they thrown?",{"text":71,"@type":63},"BookNotAvailableException is used when borrowing an unavailable item, MemberNotRegisteredException relates to member registration (as defined in the design), and LateReturnException is thrown on late returns with an included fee amount.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},655757,1793051813,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":96,"slug":129},19,"General","general",{"code":4,"msg":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":33,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":144,"read_time":145},962094243610,"https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","Library Management System-Java OOP Case Study  \nThis document presents a Java-based Library Management System designed using Object-Oriented Programming (OOP) principles. It includes core class designs, inheritance hierarchy, interfaces, polymorphism, exception handling, UML diagram, and source code.  \nMain Classes and Design  \n1. LibraryItem (Abstract Class)  \n-Attributes: id, title, author, isAvailable  \n-Methods: borrowItem(), returnItem(), calculateLateFee(int), getItemType(), matches(String)  \n-Relationship: Base class for Book, Magazine, Journal  \n2. Book, Magazine, Journal (Subclasses)  \n-Additional Attributes: genre, issueNumber, etc.  \n-Inherit from LibraryItem  \n-Implement late fee calculations differently  \n3. Member  \n-Attributes: memberId, name, borrowedItems  \n-Methods: borrowItem(), returnItem()  \n4. Library  \n-Attributes: items, members  \n-Methods: addItem(), registerMember(), searchItem(), borrowItem()  \n5. Searchable (Interface)  \n-Method: matches(String keyword)  \n6. Custom Exceptions  \n-BookNotAvailableException, MemberNotRegisteredException, LateReturnException  \nOOP Principles in Design  \n-Encapsulation: Private variables with getters/setters.  \n-Inheritance: Book, Magazine, Journal inherit from LibraryItem.  \n-Polymorphism: calculateLateFee() and borrowItem() use base type.  \n-Abstraction: LibraryItem is abstract, and Searchable is an interface.  \nUML Class Diagram  \nVisual representation of the system's structure.  \n[Book.java](Book.java)  \npublic class Book extends LibraryItem { private String genre;  \npublic Book(String id, String title, String author, String genre) { super(id, title, author);  \nthis.genre = genre;  \n}  \npublic String getGenre() {  \nreturn genre;  \n}  \n@Override  \npublic double calculateLateFee(int daysLate) {  \nreturn daysLate * 1 .5;  \n}  \n@Override  \npublic String getItemType() {  \nreturn \"Book\";  \n}  \n}  \n[LibraryItem.java](LibraryItem.java)  \npublic abstract class LibraryItem implements Searchable { private String id;  \nprivate String title;  \nprivate String author;  \nprivate boolean isAvailable = true;  \npublic LibraryItem(String id, String title, String author) {  \n[this.id = id](this.id = id) ;  \nthis.title = title;  \n[this.author = author](this.author = author) ;  \n}  \npublic boolean isAvailable() {  \nreturn isAvailable;  \n}  \npublic void borrowItem() throws BookNotAvailableException {  \nif (! isAvailable) throw new BookNotAvailableException(\"Item is already borrowed .\");  \nisAvailable = false;  \n}  \npublic void returnItem() {  \nisAvailable = true;  \n}  \npublic abstract double calculateLateFee(int daysLate);  \npublic abstract String getItemType();  \n@Override  \npublic boolean matches(String keyword) {  \nreturn title.contains(keyword) || author .contains(keyword);  \n}  \n}  \n[Magazine.java](Magazine.java)  \npublic class Magazine extends LibraryItem {  \npublic Magazine(String id, String title, String author) { super(id, title, author);  \n}  \n@Override  \npublic double calculateLateFee(int daysLate) {  \nreturn daysLate * 1 .0;  \n}  \n@Override  \npublic String getItemType() {  \nreturn \"Magazine\";  \n}  \n}  \n[Journal.java](Journal.java)  \npublic class Journal extends LibraryItem {  \npublic Journal(String id, String title, String author) { super(id, title, author);  \n}  \n@Override  \npublic double calculateLateFee(int daysLate) {  \nreturn daysLate * 2 .0;  \n}  \n@Override  \npublic String getItemType() {  \nreturn \"Journal\";  \n}  \n}  \n[Member.java](Member.java)  \npublic class Member { private String memberId;  \nprivate String name;  \nprivate List\u003CLibraryItem> borrowedItems = new ArrayList\u003C>();  \npublic Member(String memberId, String name) {  \nthis.memberId = memberId;  \n[this.name = name](this.name = name) ;  \n}  \npublic void borrowItem(LibraryItem item) throws BookNotAvailableException { item.borrowItem();  \nborrowedItems .add(item);  \n}  \npublic void returnItem(LibraryItem item, int daysLate) throws LateReturnException { item.returnItem();  \ndouble fee = item.calculateLateFee(daysLate); ","cbCaivsX1M0BDTbC","https://ap.wps.com/l/cbCaivsX1M0BDTbC","pdf",1059547,11,"English","# Main Classes and Design\n## LibraryItem (Abstract Class)\n## Book, Magazine, Journal (Subclasses)\n## Member\n## Library\n## Searchable (Interface)\n## Custom Exceptions\n# OOP Principles in Design\n# UML Class Diagram\n## Book.java\n## LibraryItem.java\n## Magazine.java\n## Journal.java\n## Member.java\n## Searchable.java","[{\"question\":\"What is the role of LibraryItem in the system design?\",\"answer\":\"LibraryItem is an abstract base class that stores shared item attributes and declares common operations like borrow/return, late-fee calculation, item type retrieval, and keyword matching.\"},{\"question\":\"How do Book, Magazine, and Journal differ in late-fee behavior?\",\"answer\":\"Each subclass overrides calculateLateFee(int daysLate) to apply a different multiplier, and each returns its own item type string.\"},{\"question\":\"What custom exceptions are used and when are they thrown?\",\"answer\":\"BookNotAvailableException is used when borrowing an unavailable item, MemberNotRegisteredException relates to member registration (as defined in the design), and LateReturnException is thrown on late returns with an included fee amount.\"}]","Library Management System - Java OOP Case Study | PDF",1792963616,28]