예제 #1
0
            input("Enter name of Book whose item number to be removed:"),
            input("ISBN:"))
    elif (choice == 6):
        catalog.searchByAuthor(input('Enter Author name:'))
    elif (choice == 7):
        catalog.displayAllBooks()
        print("Have a Good Day!")
        sys.exit()
    else:
        print("Wrong Input")
    return ""


catalog = Catalog()

b = catalog.addBook('Shoe Dog', 'Phil Knight', '2015', 312)
catalog.addBookItem(b, '123hg', 'H1B2')
catalog.addBookItem(b, '124hg', 'H1B4')
catalog.addBookItem(b, '125hg', 'H1B5')

b = catalog.addBook('Moonwalking with Einstien', 'J Foer', '2017', 318)
catalog.addBookItem(b, '463hg', 'K1B2')

catalog.displayAllBooks()

m1 = Member("Vish", "Bangalore", 23, 'asljlkj22', 'std1233')
librarian = Librarian("Awantik", "Bangalore", 34, 'asljlkj22', 'zeke101')

print("-------------------------------------------------")
print("For Member -- Type Appropiate number for service:")
print("1. Issue Book")
예제 #2
0
 def addBook(self, name, author, publish_date, pages, Catalog):
     b3 = Catalog.addBook(name, author, publish_date, pages)
     self.book2.append(b3)
     print("A book is added by Librarian")
     return b3
  # -*- coding: utf-8 -*-

from Book import Book
from Catalog import Catalog
from User import Member, Librarian

b1 = Book('python','py', '2015',312)
b1.addBookItem('123A','H1B2')
b1.addBookItem('124B','H1B3')

b1.printBook()

catalog = Catalog()

b = catalog.addBook('python','py', '2015',312)
catalog.addBookItem(b, '123hg','H1B2')
catalog.addBookItem(b, '124hg','H1B4')
catalog.addBookItem(b, '125hg','H1B5')

b = catalog.addBook('Einstien','J ', '2017',318)
catalog.addBookItem(b, '463hg','K1B2')

b = catalog.addBook('C','E Balguruswamy', '1985',319)
catalog.addBookItem(b, '473A','K1B3')

b = catalog.addBook('Verses','Walker', '2011',320)
catalog.addBookItem(b, '483B','K1B4')

catalog.displayAllBooks()

m1 = Member("pavan","hassan",23,'asljlk@j22','std1233')
예제 #4
0
 def addBook(self, name, author, publish_date, pages):
     Catalog.addBook(name, author, publish_date, pages)
예제 #5
0
 def addBook(self, title, author, category, publication_date):
     Catalog.addBook(title, author, category, publication_date)
예제 #6
0
from Book import Book
from Catalog import Catalog
from User import User
from User import Member, Librarian

c = Catalog()
b1 = c.addBook('Politics of Opportunism','R P N Singh', '2019',100)
c.addBookItem(b1,'isbn1','R1')
c.addBookItem(b1,'isbn1-2','R1-2')
b2 = c.addBook('Malayalam poetry','Akkitham Achuthan Namboodri', '2019',130)
c.addBookItem(b2,'isbn2','R2')
b3 = c.addBook('Celestial Bodies','Jokha Alharthi', '2019',140)
c.addBookItem(b3,'isbn3','R3')

m = Member('member1','bangalore',24,'123412341234',25,c)
bi1 = m.issueBook('Politics of Opportunism')
bi2 = m.issueBook('Politics of Opportunism')
m.returnBook(bi1)
bi3 = m.issueBook('Politics of Opportunism')
bi4 = m.issueBook('Politics of Opportunism')
예제 #7
0
                    " \n3) Voeg een boek toe \n4) Voeg een gebruiker toe \n"
                    "5) Voeg een gebruiker toe met admin rechten\n6) Logout\n7) "
                    "Restore from backup\n8) Save to backup\n")

                while start_keuze_gebruiker == "1":
                    print("***** Bekijk boeken *****")
                    catalog.printBooks()
                    start_keuze_gebruiker = input("Press enter to continue")
                while start_keuze_gebruiker == "2":
                    print("***** Filter boeken  *****")
                    catalog.filter()
                    start_keuze_gebruiker = input("Press enter to continue.")
                # nieuw boek toevoegen
                while start_keuze_gebruiker == "3":
                    print("***** Voeg een boek toe *****")
                    catalog.addBook()
                    start_keuze_gebruiker = input("Press enter to continue.")
                # nieuwe gebruiker toevoegen
                while start_keuze_gebruiker == "4":
                    print("***** Voeg een nieuwe gerbuiker toe *****")
                    catalog.addPerson()
                    start_keuze_gebruiker = input("Press enter to continue.")
                while start_keuze_gebruiker == "5":
                    print("***** Voeg een nieuwe gerbuiker toe *****")
                    catalog.addPerson(True)
                    start_keuze_gebruiker = input("Press enter to continue.")
                if start_keuze_gebruiker == "6":
                    catalog.loggedInUser = None
                    start_keuze_gebruiker = input("Press enter to continue.")
                    start_reservering_gebruiker = False
if start_keuze == "4":