-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working copy of Fall 2023, but code needs to be revised before merge …
…to main
- Loading branch information
1 parent
305d7c2
commit b8ca269
Showing
8 changed files
with
121 additions
and
53 deletions.
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 @@ | ||
COLUMN_NAMES |
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
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
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,11 +1,37 @@ | ||
|
||
class Teacher: | ||
|
||
def __init__(self, name: str, phone: str, school: str, email: str) -> None: | ||
def __init__(self, name: str, phone: str, school: str, email: str, weekday_preferences: list) -> None: | ||
""" Teacher object that holds information about a teacher.""" | ||
|
||
self.name = name | ||
self.phone = phone #USE REGEX | ||
self.school = school | ||
self.email = email #USE REGEX | ||
self.weekdays = weekday_preferences | ||
self.weekday_idx = 0 | ||
self.weekday = self.weekdays[self.weekday_idx] | ||
self.classrooms = [] | ||
|
||
def next_weekday(self) -> None: | ||
""" Updates the weekday to the next weekday preference. """ | ||
possible_weekdays = ["Monday", "Tuesday", "Wednesday", "Thursday"] | ||
if self.weekday_idx < 3 and self.weekdays[self.weekday_idx + 1] in possible_weekdays: | ||
self.weekday_idx += 1 | ||
self.weekday = self.weekdays[self.weekday_idx] | ||
|
||
def add_classrooms(self, classroom) -> None: | ||
""" Adds classrooms to the teacher's list of classrooms. """ | ||
self.classrooms.append(classroom) | ||
|
||
def unassign_volunteers(self) -> None: | ||
""" Unassigns volunteers from the classroom and resets their group number and assigned_leader status.""" | ||
for classroom in self.classrooms: | ||
classroom.unassign_volunteers() | ||
|
||
def reset_weekday(self) -> None: | ||
""" Resets the weekday to the first weekday preference. """ | ||
self.weekday_idx = 0 | ||
self.weekday = self.weekdays[self.weekday_idx] | ||
|
||
|
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
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
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
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