Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

10. how do event - driven programs progress? * a. they run in a linear …

Question

  1. how do event - driven programs progress? *

a. they run in a linear fashion from start to end.
b. the code executes sequentially.
c. the code executes when an action occurs that it is programmed to recognize.
d. the code runs iteratively.

  1. what is one way to debug a program? *

a. add temporary print messages to determine program values.
b. test with different data values each time.
c. document the error in the user guide and online help text.
d. override the error with the correct value.

  1. which development process breaks the requirements down into small modules and adds the code, once working, to the project as a whole? *

a. additive
b. incremental
c. iterative
d. spiral

Explanation:

Brief Explanations
  • Question 10: Event - driven programs execute code when a specific action (event) occurs. Options A and B describe linear/sequential execution (common in non - event - driven, traditional programs). Option D (iterative) is about repeating code blocks, not event - based.
  • Question 11: Adding temporary print messages (Option A) is a common debugging technique to track variable values. Testing with different data (Option B) is more of a testing (not specifically debugging) aspect. Documenting errors (Option C) is not debugging. Overriding (Option D) doesn't help in identifying the root cause.
  • Question 12: The incremental development process breaks requirements into small modules. Once a module works, it is added to the project. Additive is not a standard software development process term in this context. Iterative is about repeating cycles (not adding working modules). The spiral model is a risk - driven process.

Answer:

  1. C. The code executes when an action occurs that it is programmed to recognize.
  2. A. Add temporary print messages to determine program values.
  3. B. Incremental.