Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Information Modeling And Relational Databases

Authors: Terry Halpin, Tony Morgan

2nd Edition

0123735688, 978-0123735683

More Books

Students also viewed these Databases questions

Question

3. What might you have done differently?

Answered: 1 week ago

Question

Types of cultural maps ?

Answered: 1 week ago

Question

Discuss the various types of leasing.

Answered: 1 week ago

Question

Define the term "Leasing"

Answered: 1 week ago

Question

What do you mean by Dividend ?

Answered: 1 week ago

Question

In an Excel Pivot Table, how is a Fact/Measure Column repeated?

Answered: 1 week ago