Skip to content

Commit

Permalink
Solution
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrii Ovod committed Sep 25, 2024
1 parent e2319f9 commit 3f2a0df
Showing 1 changed file with 50 additions and 1 deletion.
51 changes: 50 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
@@ -1 +1,50 @@
# 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 "<h1>Hello world</h1>"


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(BackendDeveloper, FrontendDeveloper):
def __init__(self, name: str) -> None:
super().__init__(name)
self.skills = (BackendDeveloper(name).skills + FrontendDeveloper(name)
.skills)

def create_web_application(self) -> None:
print(f"{self.name} started creating a web application...")
api_address = self.create_powerful_api()
webpage_code = self.create_awesome_web_page()
return api_address, webpage_code

0 comments on commit 3f2a0df

Please sign in to comment.