Question: Software Testing: C1 C2 8. Consider this class model segment. Consider the code given for method m1(). Consider testing m1() before having m2() ready. Design

Software Testing:

Software Testing: C1 C2 8. Consider this class model segment. Consider the

C1 C2 8. Consider this class model segment. Consider the code given for method m1(). Consider testing m1() before having m2() ready. Design a set of path-coverage test cases for testing m1(). Justify your test cases selection. Use and specify stubs and/or drivers as needed. major m1 m2 == 1. public int m1(String inType) { 2. 3. if inType "Audit" { 4. return 0; 5. } 6. outVal = 1; 7. 02 = new C2(); 8. GPA = 02.m2(); 9. if GPA > 3.5 { 10. outVal = outVal * 10 + 10; 11. if major == "ICS" { 12. outVal = outVal * 2; 13. } 14. outVal = outVal / 2; 15. } 16. elsif GPA > 2.5 { 17. outVal = 60 - 30 * outVal; 18. } 19. else { 20. outVal = 20 / outVal + 20; 21. } 22. return outVal; 23. } What would be the difference, if any, if the objective were statement-coverage

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!