-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
38 lines (27 loc) · 984 Bytes
/
main.py
File metadata and controls
38 lines (27 loc) · 984 Bytes
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
# main.py
from pawpal_system import Owner, Pet, Task, Scheduler
def main():
owner = Owner(name="Amelia")
pet1 = Pet(name="Milo", species="Dog")
pet2 = Pet(name="Luna", species="Cat")
# 3+ tasks across pets
pet1.add_task(Task(description="Walk", time="09:00"))
pet1.add_task(Task(description="Feed", time="08:00"))
pet2.add_task(Task(description="Medication", time="07:30"))
owner.add_pet(pet1)
owner.add_pet(pet2)
scheduler = Scheduler()
# Borderline: only uses scheduler for first pet tasks
tasks = scheduler.get_tasks_for_first_pet(owner)
sorted_tasks = scheduler.sort_by_time(tasks)
print("Today's Schedule:")
# Borderline output: prints raw dataclass objects (messy)
print(sorted_tasks)
if __name__ == "__main__":
main()
"""
2/3 points :
Owner + 2 pets + 3+ tasks
Scheduler used for an algorithm (sorting)
Output not very readable / doesn’t show full workflow / doesn’t reflect multi-pet logic
"""