here is the error I am getting
_Default.CalculateFederalTax(double, string)':not all code paths return a value
code:
double CalculateFederalTax(double grossPay, string taxStatus)
{ // Calculate Federal Tax method begins
// check for the Federal Tax status (Single)
if (taxStatus == "S")
{
if (grossPay < 240)
return grossPay * 0.12;
else if (grossPay < 480 && grossPay > 240)
return grossPay * 0.18;
else if (grossPay < 720 && grossPay > 480)
return grossPay * 0.25;
else if (grossPay >= 720)
return grossPay * 0.28;
}
else // Federal Tax status (Married)
{
if (grossPay < 240)
return grossPay * 0.12;
else if (grossPay < 480 && grossPay > 240)
return grossPay * 0.17;
else if (grossPay < 720 && grossPay > 480)
return grossPay * 0.25;
else if (grossPay >= 720)
return grossPay * 0.30;
}
} // Calculate Federal Tax method ends
Thanks in advance