-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
created some classes and their methods
- Loading branch information
Showing
1 changed file
with
54 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,54 @@ | ||
# write your code here | ||
|
||
class SoftwareEngineer: | ||
skills = [] | ||
|
||
def __init__(self, name: str) -> None: | ||
self.name = name | ||
|
||
def learn_skill(self, skill: str) -> None: | ||
self.skills.append(skill) | ||
|
||
|
||
class FrontendDeveloper(SoftwareEngineer): | ||
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): | ||
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): | ||
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( | ||
AndroidDeveloper, | ||
BackendDeveloper, | ||
FrontendDeveloper, | ||
SoftwareEngineer | ||
): | ||
skills = [ | ||
"Python", | ||
"SQL", | ||
"Django", | ||
"JavaScript", | ||
"HTML", | ||
"CSS", | ||
] | ||
|
||
def create_web_application(self) -> None: | ||
print(f"{self.name} started creating a web application...") | ||
self.create_powerful_api() | ||
self.create_awesome_web_page() |