I want python Code. Batch Avionics 6 is required to develop a Library Management Systems (LMS) using
Fantastic news! We've Found the answer you've been seeking!
Question:
I want python Code.
Batch Avionics 6 is required to develop a Library Management Systems (LMS) using object-oriented programming concepts.
- Create a class named “book” with following attributes:
- book ID
- Title of the book
- Author of the book
- Status of the book (available or issued) // initially it will 1 (available), later it will be 0 when this book is issued to someone.
- student_Reg // initially it will be empty. Later, it will hold the registration number of that student to whom this book is issued.
- Create another class named “student” with following attributes:
- Name
- Surname
- Registration_Number
- Status of current student// A student can only issue one book to his name. So initially it will be 1 (no book issued to this student). Later, it will become 0 (book already issued).
- Create a child class named “LMS” derived from parent classes “student & book”. It will have following functionalities:
- Issue_book()
- This method will issue a book to a student. You need to pass following to this method:
- List of available books
- ID of book to be issued
- List of students
- Registration number of the student to whom the book is to be issued
- First you will check whether this book is available for issuing (check its status). You can write a method in book class to return status of the specific book.
- Second, you will check whether this student is available for issuing (check its status). You can write a method in student class to return status of the specific student.
- If both book and the student are available for issuing, issue the book to that particular student and make status of book and student unavailable (0).
- You will also need to maintain a record that which book is issue to which student by appending the registration of the student in the student_Reg list of the book.
- Return_book()
- This method will return a book. You need to pass following to this method:
- List of available books
- ID of book to be returned
- List of students
- First you will check whether this book is issued to someone or not. And if issued, then what is the registration number of the student. You can write a method in book class to return the registration number of that student.
- Make status of book and student available (1).
- You will also need to remove the registration number of student from the student_Reg list of that book.
Create a list of book and students as following: (Picture is attached)
Use these books and student to issue and return few books.
Related Book For
Posted Date: