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
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)![book_list = [] book_list.append (book (1122,"intro to CP","adeel",1)) book_list.append (book (1133, "CP++","saad",1))](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2021/04/608c3fcbb5eef_Screenshot40.png)
Use these books and student to issue and return few books.
book_list = [] book_list.append (book (1122,"intro to CP","adeel",1)) book_list.append (book (1133, "CP++","saad",1)) book_list.append (book (1144, "Python++", "tahir",1)) %3! student_list = [] student_list. append (student ("Adeel","Yousaf",1504,1)) student_list. append(student("Saad", "Ilyas",1204,1)) %3D
Step by Step Solution
3.40 Rating (162 Votes )
There are 3 Steps involved in it
Library Management System Python Project with Source Code library management system python project ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
60915c5da80cb_209086.pdf
180 KBs PDF File
60915c5da80cb_209086.docx
120 KBs Word File
