-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdataStructures.py
46 lines (38 loc) · 1.3 KB
/
dataStructures.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
class Skill:
def __init__(self, name, level):
self.name = name
self.level = level
class Contributor:
def __init__(self, name, skills):
self.name = name
self.skills = skills
def findSkill(self, name):
foundSkill = False
for sk in self.skills:
if(name == sk.name):
foundSkill = True
return foundSkill
def findSkillLevel(self, name, level):
foundSkill = False
for sk in self.skills:
if((name == sk.name) and (int(level) <= int(sk.level))):
foundSkill = True
return foundSkill
def findSkillLevelMentor(self, name, level):
foundSkill = False
for sk in self.skills:
if((name == sk.name) and (int(level) == int(sk.level-1))):
foundSkill = True
return foundSkill
class Project:
def __init__(self, name, daysToComplete, score, bestBefore, roles, requirements):
self.name = name
self.daysToComplete = daysToComplete
self.score = score
self.bestBefore = bestBefore
self.roles = roles
self.requirements = requirements
class ProjectAssignment:
def __init__(self, name, namesOfContributors):
self.name = name
self.namesOfContributors = namesOfContributors