Exemple #1
0
lib.addBookItem('Theory of Machines', 'SMNQS6664A', 'TM301')
lib.addBookItem('Theory of Machines', 'SMNQS6664A', 'TM302')
lib.viewBooks()
lib.removeBookItem('SMNQS6664A')
lib.viewBooks()
lib.removeBook('Theory of Machines')
lib.viewBooks()

member1 = Member('Aditya', 'Indore', 24, '9424534453', 'ADI942')
member2 = Member('Harish', 'Indore', 25, '9791457862', 'HAR979')
print(member2)
member1.viewBooks()
member1.reserveBook('Thermodynamics')
member2.reserveBook('Machine Design')
member1.viewBooks()

lib.viewissuedBookItems()
lib.viewIssuerInfo()

member1.returnBook()
member2.returnBook()
member1.viewBooks()

member2.issuedBook('Thermodynamics')

lib.addMember('Mayur', 'Indore', '23', '9179030140', 'MAY917')
lib.viewMembers()
lib.searchMember('Mayur')
lib.removeMember('Harish')
member1.reserveBook('Machine Design')
Exemple #2
0
member2 = Member("Nitin", "Mumbai", 23, "DCBA4321", "STUD8765")
print(member2)
member1.viewBooks()
member1.searchByTitle("Kafka On The Shore")
member1.searchByTitle("Rich Dad Poor Dad")
member1.searchByAuthor("Phil Knight")
member1.searchByAuthor("Robert Kiyosaki")
member1.searchByCategory("Fiction")
member1.searchByCategory("Self Help")
member1.searchByPublicationDate("2015")
member1.searchByPublicationDate("2013")
member1.reserveBook("Shoe Dog")
member2.reserveBook("Kafka On The Shore")
member1.viewBooks()

lib.viewReservedBookItems()
lib.viewIssuerInfo()

member1.returnBook()
member2.returnBook()
member1.viewBooks()

member2.reserveBook("Kafka On The Shore")
member2.extendDates()

lib.addMember("Mukesh", "Mumbai", "23", "PQRS6789", "STUD6789")
lib.viewMembers()
lib.searchMember("Mukesh")
lib.removeMember("Niel")
member1.reserveBook("Kafka On The Shore")
lib.viewBooks()


member1 = Member("Ashwani Devesh Kashyap", "Mumbai", 23, "ADK4321", "NESS4321")
member2 = Member("Shivani Kashyap", "Surat", 19, "SK1234", "MSU8765")
member3 = Member("Navneet Kashyap", "Patna", 21, "NK9876", "JSPM1715")
print(member1)
print(member2)
print(member3)
member1.viewBooks()
member1.search_by_book_name("Theory of everything")
member1.search_by_book_name("The magic of thinking big")
member1.search_by_author_name("Stephen Hawking")
member1.search_by_author_name("JK rowling")
member1.issue_book("Theory of everything", 8)
member2.issue_book("Crack IELTS", 10)
member1.viewBooks()

lib.view_issued_books()

member1.return_book("001ac")
member1.viewBooks()

member2.issue_book("Crack IELTS")

lib.viewMembers()

lib.removeMember("Navneet")
member1.issue_book("Crack IELTS")
lib.viewMembers()
lib.view_issued_books()
            book_name = input(
                "Enter the name of the book you want to remove: ")
            rack = input("Enter rack number: ")
            lib.removeBookItem(book_name, rack)
            print("\n")
        elif user_choice == 9:
            mem_name = input("Enter name of Member: ")
            location = input("Enter location Of Member: ")
            age = input("Enter age of Member: ")
            ad_id = input("Enter aadhar Id: ")
            st_id = input("Enter student Id")
            lib.Member(mem_name, location, age, ad_id, st_id)
            print("\n")
        elif user_choice == 10:
            name = input("Enter the name of Member you want to remove: ")
            lib.removeMember(name)
            print("\n")
        elif user_choice == 11:
            print("You are now going to see all the list of member: ")
            lib.viewMembers()
        else:
            print("Not a valid option")

        print("press q to quit or c to conitinue")
        choice = ""
        while (choice != "c" and choice != "q"):
            choice = input()
            if choice == "c":
                continue
            elif choice == "q":
                sys.exit()