APCSP Program Design and Development Flashcards
6 cards from real APCSP practice questions. Tap to flip, then mark Knew It or Still Learning โ missed cards come back until you master them.
Read the first 6 APCSP Program Design and Development flashcards as text
What is a 'test case' in software development?
Answer: A specific set of inputs used to verify a program produces expected outputs
A test case defines known inputs and their expected outputs, allowing developers to verify program correctness systematically.
Which scenario best illustrates 'edge case' testing?
Answer: Testing the program with the largest or smallest valid values and boundary conditions
Edge cases test the boundaries of valid input ranges, where bugs are most likely to occur in conditional logic.
What is the role of a 'specification' in program development?
Answer: A document that describes what a program should do before it is built
A specification defines the expected behavior, inputs, and outputs of a program, guiding development and testing.
Why is it important to test a program with invalid inputs?
Answer: Programs should handle unexpected inputs gracefully without crashing
Robust programs handle invalid inputs by displaying errors or using defaults rather than crashing or producing wrong results.
What does 'debugging' involve?
Answer: Identifying and fixing errors so a program behaves as intended
Debugging is the process of locating logical, syntax, or runtime errors and correcting them so the program runs correctly.
Which type of error causes a program to produce incorrect results without crashing?
Answer: Logic error
A logic error means the program runs successfully but produces wrong output because the algorithm is flawed.