Docsity

Final Exam | Software Practicum - Fall 2001 | CS 2335, Exams of Computer Science

Toggle sidebar
bg1
CS 2335 Final Exam
Fall 2001
Name: _______________________________________
Gt Number: ___________________________________
This exam counts for 10% of your course grade and covers the testing phase of the course.
Part I. (2 Points each, 20 Points Total) Multiple Choice. Select the best, most correct answer
to each question.
1. Equivalence partition testing assumes:
a. That the potential input can be separated into sets where if any member in a set
succeeds, all the members will succeed.
b. That the source code can be divided into basic blocks that execute contiguously.
c. That test cases are derived from the specification.
d. Both a and c are correct.
2. The difference between Halsteads and McCabes complexity measure is:
a. McCabe believed the number of operators and operands in a program determined
complexity, while Halstead believed it was the number of decision points.
b. McCabe believed that complexity was determined by whether the program was
comparable to a CS2130 lab, while Halstead believed that the complexity should be
compared to UGA graduate labs.
c. McCabe believed that the number of decisions (predicates) determined the
complexity, while Halstead believed the number of operands and operators in a
module determined it.
d. McCabe believed that complexity was determined by analysis of the algorithm used in
a module, while Halstead believed it was solely determined by characteristics of the
source code.
3. If test cases are determined by analysis of the source code, the test technique is:
a. Blackbox
b. Whitebox
c. Mutation
d. Random
4. If the test cases are derived by analysis of the requirements (specifications), this is:
a. Blackbox
b. Whitebox
c. Mutation
d. Random
pf3
pf4
pf5

Partial preview of the text

Download Final Exam | Software Practicum - Fall 2001 | CS 2335 and more Exams Computer Science in PDF only on Docsity!

CS 2335 Final Exam Fall 2001 Name: _______________________________________ Gt Number: ___________________________________ This exam counts for 10% of your course grade and covers the testing phase of the course. Part I. (2 Points each, 20 Points Total) Multiple Choice. Select the best, most correct answer to each question.

  1. Equivalence partition testing assumes: a. That the potential input can be separated into sets where if any member in a set succeeds, all the members will succeed. b. That the source code can be divided into basic blocks that execute contiguously. c. That test cases are derived from the specification. d. Both a and c are correct.
  2. The difference between Halsteads and McCabes complexity measure is: a. McCabe believed the number of operators and operands in a program determined complexity, while Halstead believed it was the number of decision points. b. McCabe believed that complexity was determined by whether the program was comparable to a CS2130 lab, while Halstead believed that the complexity should be compared to UGA graduate labs. c. McCabe believed that the number of decisions (predicates) determined the complexity, while Halstead believed the number of operands and operators in a module determined it. d. McCabe believed that complexity was determined by analysis of the algorithm used in a module, while Halstead believed it was solely determined by characteristics of the source code.
  3. If test cases are determined by analysis of the source code, the test technique is: a. Blackbox b. Whitebox c. Mutation d. Random
  4. If the test cases are derived by analysis of the requirements (specifications), this is: a. Blackbox b. Whitebox c. Mutation d. Random
  1. Coverage Criteria is: a. A test technique which derives test cases from branch information b. A measure of the “completeness” or adequacy of the test technique c. The amount of clothing required to be worn on the beach at spring break d. None of these answers is correct
  2. Validation is: a. A set of techniques followed to insure that the team is developing software using good processes b. A set of techniques used to make people feel good about themselves c. A set of techniques followed to ensure that the team is building what the customer expects. d. None of these answers is correct
  3. Verification is: a. A set of techniques followed to insure that the team is developing software using good processes b. A set of techniques used by the IRS on your tax return c. A set of techniques followed to ensure that the team is building what the customer expects. d. None of these answers is correct
  4. Testing all possible paths through a module is: a. The strongest whitebox coverage criteria b. The strongest blackbox coverage criteria c. Not possible to achieve if the module has loops d. Both a and c are correct e. Both b and c are correct
  5. Which of the following statements BEST describes the current view of testing: a. Testing is used solely to aid debugging b. Testing verifies that the code is defect-free c. Testing demonstrates that the code does not function properly d. Testing reduces down-stream risk of delivering poor software e. Testing is a mental discipline of quality throughout the life-cycle
  6. Designing a good test case involves selecting input that: a. Will cause a failure in the module b. Will make the module execute successfully c. Minimizes the overall number of test cases required d. Both a and c are correct e. Both b and c are correct Part II (10 Points each, 60 Points total) Short Answer.
  7. Briefly discuss the relationship between test cases, test suites and test harnesses.
  1. The “normal” development cycle is design->code->test. What is the XP development cycle like (think about the XP triangle)?
  2. (20 Points) Code Analysis: int CalculateDeviation(int X, int Y) { int total=0; if (x>30) { total=(x40+y50).95; } for (int i=0;i<Y;i++) { total+=y5; } return total; } a. (8 points) Draw the control flow graph for this code.

b. (2 points) What is the McCabe measure for this code? _______________ c. (5 points) What are the test cases to achieve statement coverage for this code? d. (3 points) What additional test cases (if any) are required for branch coverage? e. (2 points) Is it possible to test all paths through this module? __________