Hello, i am having trouble figuring out the correct method coding for this java
ID: 3732391 • Letter: H
Question
Hello, i am having trouble figuring out the correct method coding for this java test and any help is appreciated the problem asked that i use conditionals
First Spouse Tax them enter their incomes separately, but they will be taxed as one. This test is for the first ofo Under certain circumstances, married couples can file a joint return. In these cases, we'll let ur spouse tax situations: * This tax is based the income of two spouses. They pay 5% of * the total of their incomes. @Test public void testSpouseSimple() TaxCalculator tc new TaxCalculator ; assertEquals (40000.02 0.05, tc.spouseSimple (20000.01, 20000.01), 0.001) assertEquals (30000 0.05, tc.spouseSimple (20000, 10000), 0.001);Explanation / Answer
public class TaxCalculator { public double spouseSimple(double n1, double n2) { return 0.5 * (n1 + n2); } }
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.