Class
Class
Elmergib University
def display_info(self):
print(f"Book: {self.title}\n Author: {self.author} \n ISBN: {self.ISBN}")
class BorrowableBook(Book):
def __init__(self, title, author, ISBN, borrower_name, due_date):
super().__init__( title, author, ISBN)
self.__borrower_name = borrower_name
self.due_date = due_date
def get_borrower_name(self):
return self.__borrower_name
def display_info(self):
super().display_info()
print(f"Borrower name: {self.__borrower_name}\n Due date: {self.due_date}")
class ReferenceBook(Book):
def __init__(self, title, author, ISBN, room_number):
super().__init__( title, author, ISBN)
self.room_number = room_number
def display_info(self):
super().display_info()
print(f"Room number: {self.room_number} ")
book1.display_info()
book2.display_info()
print("\nBorrowable Book:")
book_br1.display_info()
book_br2.display_info()
print("\nReference Book:")
book_re1.display_info()
book_re2.display_info()