Pre-lab 2 questions
Name:
Cnet ID:
Lab start time:

Note: There may be more than one answer. Make sure you circle
all that apply
******* Test-driven Development *******

1. Which statement(s) are true about TDD?
(delete all answers that are not true)
      a) All tests are written before any implementation
      b) A given test is written before its associated code is implemented
      c) A given test is run before its associated code is implemented
      d) Once a piece of code passes all of its tests, it will not be modified.

2. What are the perceived benefit(s) of TDD?
(delete all answers that are not true)
      a) Help programmers better understand the requirements (specifications) for the problem before implementing the solution.
      b) Make sure that new code doesn't break existing functionality, better isolating errors.
      c) Makes coding trivially easy.
      d) Builds confidence in the validity of each new set of tests.
      e) Prevents all bugs.

********** Splitting code into three files *********

3. Which elements belong in the assign_main.c file?
(delete all answers that are not true)
      a) The functions defined in the assignment.
      b) The main function
      c) The line: #include "assign.h"
      d) Tests helper functions
      e) Helper functions for assigned functions
      f) Function prototypes
      g) Guards like #ifndef ASSIGN_H

4. Which elements belong in the assign.c file?
(delete all answers that are not true)
      a) The functions defined in the assignment.
      b) The main function
      c) The line: #include "assign.h"
      d) Tests helper functions
      e) Helper functions for assigned functions
      f) Function prototypes
      g) Guards like #ifndef ASSIGN_H

5. Which elements belong in the assign.h file?
(delete all answers that are not true)
      a) The functions defined in the assignment.
      b) The main function
      c) The line: #include "assign.h"
      d) Tests helper functions
      e) Helper functions for assigned functions
      f) Function prototypes
      g) Guards like #ifndef ASSIGN_H