Question: Python please include commenting as required, and also check result for the output We want to create a class named Library Books for managing the

 Python please include commenting as required, and also check result for
the output We want to create a class named Library Books for
Python
please include commenting as required, and also check result for the output

We want to create a class named Library Books for managing the books in a library and process new shipments of books. This class will keep count of how many books there are for each title, books with softcover will be considered a different book from the same title but with hardcover. A book will therefore be defined by 3 attributes: Title, Author, Cover. A new shipment of book will be defined by a text file containing the manifesto of the shipment. The file format contains one boor per line (remember same title with different covers are considered different books). Each line contains the author title;cover amount. Cover will be either the string "True" or "False". Amount will be an integer representing the number of books in that shipment. Here is an example of such a file: Frank Herbert;Dune;False;25 Frank Herbert;Dune; True;10 Dan Simmons; Hyperion; True:20 Andy Weir, The Martian;False;15 Ken Follett;Fall of Giants; False;40 Ken Follett;Fall of Giants; True; 20 The first line of the manifesto indicates that 25 Softcover copies of Frank Herbert's 'Dune' were received. The LibraryBooks class must keep count of the existing books and add new shipments to the library stock. This means that if in a second shipment a new number of copies of the same book arrives then the existing count must be updated by adding the new number of copies. The LibraryBooks class must implement the following methods: new_shipment(manifest_file); reads the information from the manifest_file and updates the count of the books, new books must be added, existing books updated their account amount_title(title): this method must return the number of copies that there is in the library for that title (title is a string) Very important, when counting the copies of a title there is no distinction between the type of cover. This is, two books with the same title will be counted together even if they have different type of covers largest amount(): will return the book with the largest number of copies in The Library Books class must implement the following methods: new_shipment(manifest_file); reads the information from the manifest_file and updates the count of the books, new books must be added, existing books updated their account. amount_title(title): this method must return the number of copies that there is in the library for that title (title is a string). Very important, when counting the copies of a title there is no distinction between the type of cover. This is, two books with the same title will be counted together even if they have different type of covers. largest amount(): will return the book with the largest number of copies in the library. Here we do make a difference in the cover type, thus the description of the book must include the title and the cover type. For example: "Dune (Softcover)". . titles_by_author(author); this method must return a list with all the titles in the library for the given author. As in the of amount_title() method, a title does not make a distinction between the type of cover. For example: Result Copies per title: 35 Largest anount: Fall of Giants (Softcover) By author: l'Edge of Eternity'. 'Fall of Giants', 'Winter of the world'1 ett")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!