Home / Projects / Library Management System
Day 6 · Day 6: Object-Oriented Programming

Library Management System

Build an object-oriented Library Management System using classes for Book and Member, supporting borrowing and returning books, with inheritance to model different member types.

Requirements

1. Create a Book class with title, author, isbn, and is_available attributes.
2. Create a Member base class with name, member_id, and borrowed_books.
3. Create a PremiumMember subclass that inherits from Member and can borrow up to 5 books, while a regular Member can borrow up to 2.
4. Create a Library class that manages a collection of books and members.
5. Implement methods: add_book, borrow_book, return_book, list_available_books.
6. Borrowing should fail if the book is unavailable or the member has reached their limit.
7. Demonstrate polymorphism: both member types use the same borrow_book() method but enforce different limits.
50 XP on completion Back to Day 6

Your Code

Output
Click "Run" to execute your code...

Log in to mark this project complete and earn XP.