Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class advertising:
- __name: str
- __price: float
- __coverage: int
- def __init__(self, name, price, coverage):
- self.__name = name
- self.__price = price
- self.__coverage = coverage
- def get_name(self):
- return self.__name
- def get_price(self):
- return self.__price
- def get_coverage(self):
- return self.__coverage
- def set_name(self, name):
- self.__name = name
- def set_price(self, price):
- self.__price = price
- def set_coverage(self, coverage):
- self.__coverage = coverage
- def ppu(self):
- return self.__price / self.__coverage
- class Socmedia(advertising):
- __stats: int
- type = "VK"
- def __init__(self, name, price, coverage, stats):
- self.__stats = stats
- super().__init__(name, price, coverage)
- def get_stats(self):
- return self.__stats
- def set_stats(self, stats):
- self.__stats = stats
- def get_type(self):
- return self.type
- def statper(self):
- return super().__price / (self.__stats / 1000 )
- class Target(advertising):
- __country = str
- type = "Target audience "
- def __init__(self, country, name, price, coverage):
- self.__country = country
- super().__init__(name, price, coverage)
- def get_country(self):
- return self.__country
- def set_country(self, country):
- self.__country = country
- name = input("\nEnter advertising company name: ")
- price = input("Enter price: ")
- coverage = int(input("Enter coverage: "))
- stats = int(input("Enter statistics: "))
- pr_comp1 = Socmedia(name, price, coverage, stats)
- name = input("\nEnter advertising company name: ")
- price = input("Enter price: ")
- coverage = int(input("Enter coverage: "))
- country = input("Enter country: ")
- pr_comp2 = Target(country, name, price, coverage)
- print("Type: ", str(pr_comp1.get_type()), " Advertising \n PR-company name: ", str(pr_comp1.get_name()),
- "\nPrice: ", float(pr_comp1.get_price()), "\nCoverage: ", int(pr_comp1.get_coverage()), "\nStatistics: ",
- int(pr_comp1.get_stats()), "\nPrice per 1000 views: ", int(pr_comp1.statper()))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement