Skip to content

Commit

Permalink
'Solution'
Browse files Browse the repository at this point in the history
  • Loading branch information
Hulk-hurry-Hulk-smash committed Oct 24, 2024
1 parent 4bdb0f0 commit 5db11d3
Showing 1 changed file with 51 additions and 1 deletion.
52 changes: 51 additions & 1 deletion app/main.py
Original file line number Diff line number Diff line change
@@ -1 +1,51 @@
# write your code here
from typing import List


class SoftwareEngineer:
def __init__(self, name: str) -> None:
self.name = name
self.skills: List[str] = []

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.extend(["JavaScript", "CSS", "HTML"])

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.extend(["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)
# Corrected the skill name to match the test expectations
self.skills.extend(["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 __init__(self, name: str) -> None:
super().__init__(name)

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

0 comments on commit 5db11d3

Please sign in to comment.