Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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:
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-coverageStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started