????????: Write the Author class with the required methods to give the following outputs as shown. # Write your codes here. # Do not change the following lines of code. a1 = Author()...


????????:
Write the Author class with the required methods to give the following
outputs as shown.


# Write your codes here.


# Do not change the following lines of code.
a1 = Author()
print("=================================")
a1.addBook(“Ice”, “Science Fiction”)
print("=================================")
a1.setName(“Anna Kavan”)
a1.addBook(“Ice”, “Science Fiction”)
a1.printDetail()
print("=================================")
a2 = Author(“Humayun Ahmed”)
a2.addBook(“Onnobhubon”, “Science Fiction”)
a2.addBook(“Megher Upor Bari”, “Horror”)
print(=================================")
a2.printDetail()
a2.addBook(“Ireena”, “Science Fiction”)
print("=================================")
a2.printDetail()
print("=================================")




OUTPUT:
=================================
A book can not be added without author name
=================================
Number of Book(s): 1
Author Name: Anna Kavan
Science Fiction: Ice
=================================
=================================
Number of Book(s): 2
Author Name: Humayun Ahmed
Science Fiction: Onnobhubon
Horror: Megher Upor Bari
=================================
Number of Book(s): 3
Author Name: Humayun Ahmed
Science Fiction: Onnobhubon, Ireena
Horror: Megher Upor Bari
=================================



Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here