Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers shown in your CFG. Use the following

Use basis path testing to develop the test cases for the following code. Use the line (statement) numbers shown in your CFG. Use the following template for the test case table. No assumptions on the range of distance.

image text in transcribed

Here are instructions for the solution...

image text in transcribed

public void setWarnings (double distance){ 1 2 redLight-yellowLight-greenLight-buzzer-brakes-false; if (distance >= 200.0) 4 greenLight-true; else 6 if (distance > 75.0) yellowLight-true; 8 9 10 else (distance 25.0) redLight-true yellowlight-true;) 12 13 14 else brakes-true redLight-true; yellowLight-true; buzzer=true;} 16 17 Test case table format: Expected Outputs TestInputs Case Distance RedLight YellowLight GreenLight BuzzerBrakes Basis Path

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

Students also viewed these Databases questions