Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please follow the directions above and code in Python. Please code in an Coding environment(PyChram). I will definitely give you an up-vote. Thanks a lot

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedPlease follow the directions above and code in Python. Please code in an Coding environment(PyChram). I will definitely give you an up-vote. Thanks a lot you are helping me a lot. Follow the directions in the first page and do the coding. The input can be dynamic or static.

Create a python program for a publisher. In this python project, the application contains three classes: Name Publisher, Book, and Author. Their relationship is shown in the UML design as follow: Fig. 1 Each class needs to be saved in an individual module with the same name as the class. All instance attributes are private data and need a setter and a getter for each attribute. Each class needs a parameterized constructor in which each parameter with a default value. The __str_method is optional (depending on how you will present instance object's information). In Publisher class, the 'authors' attribute stores all authors related to that publisher and the data is managed by the createAuthorList(). The 'books' attribute stores all books published by the publisher, and the data is managed by the createBookList() method. The 'sales' records books and their sold quantities, and the data is managed by the createLalesList() method. The calculateSales() method calculate the total sales (equals the sum of all sold books' price) based on the sale list the publisher has, and it will also calculate the payment for each author. The publisher will give 20% if the sales to authors. If a book has more than one authors, those profits will be evenly distributed to the authors of that book. In Book class, the 'price' is the sale price for one book. The 'authors' are the authors for that book, it added. When the publisher calculate the publisher, the default income is 0. author may get multiple payments sales, it will pass the payment for each author of sold books. One Create a tester for the application to tester the classes. First create a publisher object. Then create an author list for the publisher. And then, create a book list for the publisher (the author should be selected rom the author list, if there is new author, update the author list). Then create a sale-list for the 2. Add documentation and comments (following the programming template used i 4. Seay aich Academic integrity rules. 3. Upladad all your modiales to 5. Aeturn this paperwork with your Note: The sample data are provided to you just for your convenience in testingrequired ed to test all the information listed in the table. You can randomly pick bc book_list and author_list (for example 2 books will be enough for the testing) Publisher name: Pearson \begin{tabular}{|l|l|l|} \hline Book Wa. & Price $) & Authors (Author ID) \\ \hline Broor & 9.99 & A001, A005 \\ \hline B1002 & 19.49 & A002 \\ \hline Broos & 25.99 & A003, A004, A006 \\ \hline B1004 & 5000 & \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline B1001 & 9.99 & A001, A005 \\ \hline B1003 & 19.49 & A002 \\ \hline B1004 & 25.99 & A003, A004, A006 \\ \hline B1005 & 50.99 & A007, A010 \\ \hline B1006 & 12.99 & A008, A009, A011 \\ \hline B1007 & 9.99 & A001, A005 \\ \hline B1008 & 19.49 & A002 \\ \hline B1009 & 25.99 & A003, A004, A006 \\ \hline B1010 & 50.99 & A007, A010 \\ \hline & 12.99 & A008, A009, A011 \\ \hline \end{tabular}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Fundamentals Study Guide

Authors: Dr. Sergio Pisano

1st Edition

B09K1WW84J, 979-8985115307

More Books

Students also viewed these Databases questions