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
- 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 statper(self):
- return self.__stats / 1000
- class Target(advertising):
- __country: str
- __ppu: float
- type = "Target audience "
- def __init__(self, country, name, price, coverage, ppu):
- self.__country = country
- self.__ppu = ppu
- super().__init__(name, price, coverage)
- def get_country(self):
- return self.__country
- def set_country(self, country):
- self.__country = country
- def get_ppu(self):
- return self.__ppu
- def set_ppu(self, ppu):
- self.__ppu = ppu
- def effect(self):
- return super().__price / ppu
- 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 = str(input("Enter country: "))
- ppu = float(input("Enter price per unit: "))
- pr_comp2 = Target(name, price, coverage, country,ppu)
- print("\nPR type: ", pr_comp1.type, " Advertising \nPR-company name: ", str(pr_comp1.get_name()),
- "\nPrice: ", float(pr_comp1.get_price()), "euro\nCoverage: ", int(pr_comp1.get_coverage()), "\nStatistics: ",
- int(pr_comp1.get_stats()), "\nPrice per 1000 views: ", float(pr_comp1.statper()))
- print("\nPR type: ", pr_comp2.type, " Advertising \nPR-company name: ", str(pr_comp2.get_name()),
- "\nPrice: ", float(pr_comp2.get_price()), "euro\nCoverage: ", int(pr_comp2.get_coverage()),
- "\nCountry: ", pr_comp2.get_country(), "\nPrice per unit: ", pr_comp2.get_ppu(), "\nEfficiency: ", pr_comp2.effect())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement