Ejemplo n.º 1
0
 def input(self):
     print("========================================")
     print("|              Add Book                |")
     print("========================================")
     title = input("Title  : ")
     author = input("Author : ")
     price = input("Price  : ")
     copies = input("Copies : ")
     price = float(price) if price.isnumeric() else 0
     copies = int(price) if copies.isnumeric() else 0
     return Book(title, Author(author), price, copies)
Ejemplo n.º 2
0
 def __init__(self, title="", author=Author(), price=0, copies=0):
     Publication.__init__(self, title, price, copies)
     self.title = title
     self.copies = copies
     self.price = price
     self.__author = author
Ejemplo n.º 3
0
 def __init__(self, title="", author=Author(), price=0, copies=0):
     self.publik = Publication(title, price, copies)
     self.__author = author