From 8184762c311a4339b37e14bff760df791ee7441d Mon Sep 17 00:00:00 2001 From: Ihor Bachuk Date: Mon, 2 Sep 2024 08:27:08 +0300 Subject: [PATCH] solution --- app/main.py | 50 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/app/main.py b/app/main.py index fa56336e..ca4b31a2 100644 --- a/app/main.py +++ b/app/main.py @@ -1 +1,49 @@ -# write your code here +class SoftwareEngineer: + + def __init__(self, name: str) -> None: + self.name = name + self.skills = [] + + def learn_skill(self, skill: str) -> None: + self.skills.append(skill) + + +class FrontendDeveloper(SoftwareEngineer): + + def __init__(self, name: str) -> None: + super().__init__(name) + self.skills += ["JavaScript", "HTML", "CSS"] + + def create_awesome_web_page(self) -> str: + print(f"{self.name} is creating a webpage...") + return "

Hello world

" + + +class BackendDeveloper(SoftwareEngineer): + + def __init__(self, name: str) -> None: + super().__init__(name) + self.skills += ["Python", "SQL", "Django"] + + def create_powerful_api(self) -> str: + print(f"{self.name} is creating an API...") + return "http://127.0.0.1:8000" + + +class AndroidDeveloper(SoftwareEngineer): + + def __init__(self, name: str) -> None: + super().__init__(name) + self.skills += ["Java", "Android studio"] + + def create_smooth_mobile_app(self) -> str: + print(f"{self.name} is creating a mobile app...") + return "Ads every three swipes" + + +class FullStackDeveloper(FrontendDeveloper, BackendDeveloper): + + def create_web_application(self) -> None: + print(f"{self.name} started creating a web application...") + self.create_powerful_api() + self.create_awesome_web_page()