diff --git a/app/main.py b/app/main.py index d7f17097..2333a58c 100644 --- a/app/main.py +++ b/app/main.py @@ -1,16 +1,19 @@ class SoftwareEngineer: - skills = [] + # skills = [] 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): - skills = ["JavaScript", "HTML", "CSS"] + 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...") @@ -18,7 +21,9 @@ def create_awesome_web_page(self) -> str: class BackendDeveloper(SoftwareEngineer): - skills = ["Python", "SQL", "Django"] + 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...") @@ -26,7 +31,9 @@ def create_powerful_api(self) -> str: class AndroidDeveloper(SoftwareEngineer): - skills = ["Java", "Android studio"] + 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...") @@ -39,14 +46,16 @@ class FullStackDeveloper( FrontendDeveloper, SoftwareEngineer ): - skills = [ - "Python", - "SQL", - "Django", - "JavaScript", - "HTML", - "CSS", - ] + def __init__(self, name: str) -> None: + super().__init__(name) + self.skills = [ + "Python", + "SQL", + "Django", + "JavaScript", + "HTML", + "CSS", + ] def create_web_application(self) -> None: print(f"{self.name} started creating a web application...")