This repository contains the starter code, templates, and tests for the Requirements Specification II lab. Students will implement implement a function to determine the feasibility of resrouce allocation, write specifications, and explore the impact of requirements completeness on AI‑assisted coding.
You are asked to implement a Python function that determines whether a set of resource requests can be satisfied given limited capacity. The function takes as input a list of requests and available resources and returns whether a valid allocation exists. The goal is to determine feasibility of allocation based on the provided information. You may assume inputs are provided in a reasonable and consistent format. You may use ChatGPT to assist with reasoning about the problem, generating code, or writing tests.
- src/solution.py – starter file where you implement
is_allocation_feasible. Do not rename this file. - test_solution.py – Public tests you can run to check basic correctness. Use a test runner such as
pytestto execute these tests.
- Install Python 3 if not already installed.
- Implement your solution in
solution.py. - Optionally create
student_tests.pyand write at least 5 test cases. - Run tests using:
pytest file_name.py- Fix any failing tests before moving on. Remember that hidden tests will check additional requirements.
Follow the instruction in the manual.