Project B — The Scheduler (two programs, one decision)

Pairs recommended · Combines everything from Block IV.

The brief

The department runs help sessions and must staff a single tutor room. Conflicting constraints, a budget, and a deadline — the classic scheduling problem in miniature.

The data

Write generate.py producing requests.json: 30–50 help-session requests, each with a student id, a topic from a fixed list, a preferred day and hour, and a duration of 30/60/90 minutes. Constraints the data must respect: no more than 8 requests in any one hour, and a stated mix of topics (e.g. at least 20% recursion).

Part 1 — The greedy scheduler (program)

greedy.py schedules sessions one room, one tutor:

Part 2 — The validator (independent program)

validate.py reads a schedule file (not the scheduler's memory!) and checks every rule from scratch: overlaps, budget, room capacity, double-booked students. It reports every violation with row references. This is a lab-2 style spec: two representations, one contract.

Part 3 — The trade-off memo (report)

Analysis section

Data rules