Question: #Code for the Product Module: class Product: def __init__(self, name, item_num, available_num, producer, sale_price, imported_price): self.__name = name self.__item_num = item_num self.__available_num = available_num self.__producer

#Code for the Product Module: class Product: def __init__(self, name, item_num, available_num, producer, sale_price, imported_price): self.__name = name self.__item_num = item_num self.__available_num = available_num self.__producer = producer self.__sale_price = sale_price self.__imported_price = imported_price def set_name(self, name): self.__name = name def set_item_num(self, item_num): self.__item_num = item_num def set_available_num(self, available_num): self.__available_num = available_num def set_producer(self, producer): self.__producer = producer def set_sale_price(self, sale_price): self.__sale_price = sale_price def set_imported_price(self, imported_price): self.__imported_price = imported_price def get_name(self): return self.__name def get_item_num(self): return self.__item_num def get_available_num(self): return self.__available_num def get_producer(self): return self.__producer def get_sale_price(self): return self.__sale_price def get_imported_price(self): return self.__imported_price def display_info(self): print("Name: ", self.__name) print("Item Number: ", self.__item_num) print("Number of Available: ", self.__available_num) print("Producer: ", self.__producer) print("Sale Price: ", self.__sale_price) print("Imported Price: ", self.__imported_price)
#Code for the Seller Module: class Seller: def __init__(self, employee_id, first_name, last_name, sales, base_salary): self.__employee_id = employee_id self.__first_name = first_name self.__last_name = last_name self.__sales = sales self.__base_salary = base_salary def set_employee_id(self, employee_id): self.__employee_id = employee_id def get_employee_id(self): return self.__employee_id def set_first_name(self, first_name): self.__first_name = first_name def get_first_name(self): return self.__first_name def set_last_name(self, last_name): self.__last_name = last_name def get_last_name(self): return self.__last_name def set_sales(self, sales): self.__sales = sales def get_sales(self): return self.__sales def set_base_salary(self, base_salary): self.__base_salary = base_salary def get_base_salary(self): return self.__base_salary def get_sales_amount(self): sales_amount = 0 for product, quantity in self.__sales: sales_amount += product.get_price() * quantity return sales_amount def get_commission_rate(self): sales_amount = self.get_sales_amount() if sales_amount > 5000: return 0.15 else: return 0.12 def get_commission(self): sales_amount = self.get_sales_amount() commission_rate = self.get_commission_rate() return sales_amount * commission_rate def get_salary(self): return self.__base_salary + self.get_commission() def display(self): print(f"Employee ID: {self.__employee_id}") print(f"First name: {self.__first_name}") print(f"Last name: {self.__last_name}") print(f"Base salary: {self.__base_salary}") print("Sales:") for product, quantity in self.__sales: print(f"{product.get_name()} - Quantity: {quantity}") print(f"Sales amount: {self.get_sales_amount()}") print(f"Commission rate: {self.get_commission_rate() * 100}%") print(f"Commission: {self.get_commission()}") print(f"Salary: {self.get_salary()}") 

#Code for the Driver Module:

# Import the classes from the previous implementation from Product import Product from Seller import Seller # Create some instances of the Product class p1 = Product("laptop", "10001","300","IBM","800.0","1000.0") p2 = Product("Printer", "10002","200","Cannon","220.00","450.0") p3 = Product("Bike", " 10003","150","Giant","175.0","800") p4 = Product("TV", " 10004","500","Sharp","1000","1250") # Create some instances of the Seller class s1 = Seller("101", "Anne", "Sun", 1000,1) s1.set_sales([(p1, 20), (p2, 10)]) s2 = Seller("102", "Sunny", "Jen", 1200,1) s2.set_sales([(p3, 50), (p1, 2)]) s3 = Seller("103", "Grey", "Go", 1500,1) s3.set_sales([(p4, 3), (p1, 12)]) s4 = Seller("104","Lucy","Lu",1000,2) s4.set_sales([(p3, 20), (p2, 15)]) s5 = Seller("105","Kay","Bake",2000,4) s5.set_sales([(p4, 20),(p1, 5)]) # Print the information for each seller s1.display() print() s2.display() print() s3.display() #Code for the Product Module: class Product: def __init__(self, name, item_num, available_num,producer, sale_price, imported_price): self.__name = name self.__item_num = item_num self.__available_num = available_numself.__producer = producer self.__sale_price = sale_price self.__imported_price = imported_price def set_name(self, name):self.__name = name def set_item_num(self, item_num): self.__item_num = item_num def set_available_num(self, available_num):self.__available_num = available_num def set_producer(self, producer): self.__producer = producer def set_sale_price(self, sale_price): 

self.__sale_price = sale_price def set_imported_price(self, imported_price): self.__imported_price = imported_price def get_name(self): returnWhen I import Product module and Seller module to Driver module and run it. It puts this error can some please fix this error. Plus as of now it is in static input meaning hardcoded. Can you make it a dynamic input from the user.self.__name def get_item_num(self): return self.__item_num def get_available_num(self): return self.__available_num def get_producer(self): returnself.__producer def get_sale_price(self): return self.__sale_price def get_imported_price(self): return self.__imported_price def display_info(self): print("Name:", self.__name) print("Item Number: ", self.__item_num) print("Number of Available: ", self.__available_num) print("Producer:These are the instructions I followed to create it. Can you please help me on it. I will definitely give you a up vote if we could resolve it. Thanks in advance you are helping me a lot.

Employee ID: 101 First name: Anne Last name: Sun Base salary: 1 Sales: laptop - Quantity: 20 Printer - Quantity: 10 Traceback (most recent call last): File "/Users/udhayprakash/Desktop/PycharmProjects/pythonProject/Tester/driver.py", line 28, in s1.display () File "/Users/udhayprakash/Desktop/PycharmProjects/pythonProject/Seller.py", line 68, in display print(f"Sales amount: { self.get_sales_amount()\}") File "/Users/udhayprakash/Desktop/PycharmProjects/pythonProject/Seller.py", line 42, in get_sales_amount sales_amount += product.get_price() * quantity AttributeError: 'Product' object has no attribute 'get_price'. Did you mean: 'get_producer'? Process finished with exit code 1 Develop a sales management system for a distributor. This system can manage the products and sales employees. The sample products are shown in Table 1. Table 1 Sample of Products Table 2 Seller's Record (monthly) b. Functions to change the value of each of the data attribute, one attribute per function. c. Functions to return the value of each of the data elements, one element per function. d. Display values of all the member elements e. Calculate the sales amount on the sold list. f. Calculate commission (The commission rate can be determined by the sales amount. If it is over $5000, the commission rate is 15% of the sales. Otherwise, it is 12%.) g. Calculate the salary: base salary + commission. h. Print the seller's information (including basic information, sales amount, base salary and total salary) 2. Construct a tester/driver module to test the class system. It needs to meet the following criteria: (30) In this module, test the classes Product and Seller, create a list of sellers, use the benchmark information Table 1 and Table 2. 3.Submission: 1) Upload your source codes files(.py). 2) Including testing date at the end of the Tester class (use multiple line comments to block it from the source code) b. Functions to change the value of each of the data attribute, one attribute per function. c. Functions to return the value of each of the data elements, one element per function. d. Display values of all the member elements e. Calculate the sales amount on the sold list. f. Calculate commission (The commission rate can be determined by the sales amount. If it is over $5000, the commission rate is 15% of the sales. Otherwise, it is 12%.) g. Calculate the salary: base salary + commission. h. Print the seller's information (including basic information, sales amount, base salary and total salary) 2. Construct a tester/driver module to test the class system. It needs to meet the following criteria: (30) In this module, test the classes Product and Seller, create a list of sellers, use the benchmark information Table 1 and Table 2. 3.Submission: 1) Upload your source codes files(.py). 2) Including testing date at the end of the Tester class (use multiple line comments to block it from the source code)

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!