Module: Introduction to Python Programming
Assignment 2: Implementing a Library Management System using OOPs concepts
Deadline: 20 May, 2023
Submission requirements:
• Students are required to submit a Jupyter Notebook with .ipynb extension for the submission of this assignment. • Every program should begin with a comment that includes your name and a brief description of the program. For example:
Your Name: First Name Last Name
Date of submission: Mo nth Day, 2023
Description of program: For example, This program implements a library
management system using OOPs concepts in Python. • You are encouraged to submit your assignments early. Above lists the last date on which each assignment will be accepted. • Assignments must be submitted before midnight on the date due. • No credit will be given for an assignment submitted late. • Befor e submitting an assignment, you are free to ask for help in class (if your question might be of general interest), during office hours, and by e -mail. Please take advantage of this. • While you are encouraged to work with others, all work submitted must be your own. As a rule of thumb, you must do your typing. If it is not from the book or class lectures/labs and you did not type it, it is plagiarism. For the first incident, your grade will be a 0 for the assignment. • In grading your Python program solutio ns, a rubric like the following example will be used:
Task Details :
- Define a Book class with the following attributes and methods: • Attributes: • Book Title • Book Author • Book ISBN (International Standard Book Number) • Book Quantity (Number of copies available) • Book Genre • Methods: • Borrow Book • Return Book
- Define a Library class that contains a collection of Book objects with the following attributes and methods: • Attributes: • Library Name • List of Books • Methods: • Add Book • Remove Book • Display Book List • Search Book
- Define a User class with the following attributes and methods: • Attributes: • User Name • User ID • List of Borrowed Books • Methods: • Borrow Book • Return Book
- Implement a menu -driven program that allows users to: • Add a book to the library • Remove a book from the library • Display the list of books in the library • Search for a book in the library • Borrow a book from the library • Return a book to the library
- When a book is borrowed, the quantity of the book should be decreased by one, and the user should be added to the list of users who have borrowed the book. When a book is returned, the quantity of the book should be increased by one, and the user should be removed fr om the list of users who have borrowed the book.
- The program should store the book and user information in a file so that it can be loaded the next time the program is run.
- The program should handle exceptions for errors such as invalid ISBN numbers, duplicate books, and invalid input.