1. Describe appropriate test data for the following code segments:
-a. So we need to test the number smaller than zero, equals to zero, or greater than zero.
-b. We need to test the number smaller than zero, equals to zero, between zero and 100, equals to 100, and greater than 100.
2. What hapens when we provide complete code coverage of a program?
-In this condition, we execute every lines in the program at least once.
3. What is an equivalence class? Give an example.
-A equivalence class means the data are equivalent from the perspective of testing the same paths through the program. For example, if one action applys when number> 100, then, 100, 101 and 102 are equivalence class.
4. What are boundary conditions? Give an example.
-The boundary condition s are equivalence classes on or near the boundaries. For instance, if one action applys when number> 100 && number=0 && number<= 200, then 0 and 200 should be tested.
6.Suppose a teacher uses grades from 0 to 100 and wants to discount all grades below 60 in her record. Discuss the equivalence classes, boundary conditions, and extreme conditions used to test a program that processes this information.
-The equivalence classes are 0 to 60 but exclusive 60, and 60 to 100 inclusive. The boundary conditions are around 0, 60, and 100. The extreme conditions are 0, 59, 60, and 100.