Question: I'm doing a java programming code. When I run the JunitTest I get two errors. Can you please help me, so that the JunitTest bar

I'm doing a java programming code. When I run the JunitTest I get two errors.

Can you please help me, so that the JunitTest bar gets all green.

I'm doing a java programming code. When I run the JunitTest I

this is part of the JunitTest code.

get two errors. Can you please help me, so that the JunitTest

bar gets all green. this is part of the JunitTest code. this

this two are the errors

two are the errors this is the code where the errors come

this is the code where the errors come from

@Test public void testGetTaxReport_invalid_01() { String result = Utilities.getTaxReport(3, 1000); assertEquals("Illegal Status: 3", result); } @Test public void testGetTaxReport_invalid_020) { String result = Utilities.getTaxReporti-1, 30000); assertEquals("Illegal Status: -1", result); } | @Test public void testGetTaxReport_case_1_single() { String result = Utilities.getTaxReport(1, 6900); assertEquals("Single Filing: $690.00 (Part I: $690.00)", result); } Result Comparison testGetTaxReport_invalid_01 (junit_tests.TestUtilities) Expected 1 Illegal Status: 3 Actual 1 Married Filing: $100.00 (Part I: $100.00) OK testGetTaxReport_invalid_02 (junit_tests.TestUtilities) Expected 1 Illegal Status: -1 Actual 1 Married Filing: $3665.00 (Part I: $1670.00, Par OK declaring three variable to store the tax payments double part1=0, part2=0, part3 = %; if(status=-1){ // checking the status result "Single Filing:$"; // if the status is single then add Single Filling to the result if(income >8350) { // if income is greater than base tax value part1 = 8350*(8.10); // compute the parti if(income> 33950) { // if the income is greater than the second limit then part2 = (33958-8358)*(0.15); // compute part2 and part3 part3 = (income-33950)*(0.25); Helse { // if the income lies in second range which means it has only two parts part2 = (income-835)*8.15; // compute the part2 } else { parti = income 1.10; // if the income is less than the first range upper limit which means it has only Jelse //if the status is married result+="Married Filing:"; //add the married filling to the result if(income >16700){ // if the income is upper than the first range then compute parti part1 = 16700*(8.10); if(income>67990) { // if the income is greater than 67990 which means he will have both part2 and part2 = (6790016700)*(0.15); //computing part2 and part3 part3 = (income-67900)*2.25; Helse { // if the income is less than 67900 then it has only part2 part2 = (income-16700)*0.15; // compute the part2 } Helse { //if the income is less than 16708 which means it has only parti Part1 = income 2.10; } ) double totalTax = part1+part2+part3; // computing the total if(part3>) { // if part3 is greater than then the person have all three parts result += String.format(" $4.2f (Part I: $%.2f, Part II: $%.2f, Part III: $%.2f)", totalTax, parti, part2.part3); Helse if(part2>) { // if the part2 is > @ then he has only parti and part2 result += String.format(" $4.2f (Part I: $4.2f, Part I: $.2f)", totalTax,parti, part2 ); Helse //else he has only pari result += String.format(" $4.2f (Part I: $%.2f)", totalTax, parti); }

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!