AP CSP Practice: Testing & Program Development
Share
Practice Question
Why B is Correct
Testing with a variety of inputs, especially edge cases, is a fundamental practice in program development. Edge cases are extreme or unusual inputs that might cause unexpected behavior.
When testing, developers should try:
- Typical expected inputs
- Boundary values (minimum and maximum allowed)
- Invalid inputs (negative numbers, letters, etc.)
- Edge cases (very large numbers, empty inputs, special characters)
Common Mistakes
Removing functionality to avoid bugs reduces the usefulness of the program. Good development fixes issues rather than removing features.
You cannot control user behavior. Programs should handle unexpected inputs gracefully rather than relying on users to follow rules.
Rewriting from scratch is rarely necessary and wastes work already done. Iterative development means fixing specific issues, not starting over.
The AP CSP exam frequently asks about the iterative development process: design → develop → test → refine → repeat. Testing with diverse inputs is a key part of this cycle.
Want More AP CSP Practice?
Get personalized help from an experienced AP CS teacher
AP CSP Study Guide Schedule 1-on-1 Tutoring