the If condition doesn't work always trade in allowance= 3,250.00 I need it depends on the state and car year. I attached what my code and more explanation.
The trade-in allowance depends on the year of manufacture of the vehicle and the state in which it had been registered at initial purchase. FHM does not accept vehicles manufactured earlier that 1990 for trade-in allowance. For vehicles manufactured between
1990 and 1999 and initially registered in Illinois, Indiana, Iowa, Kansas, Michigan, Minnesota, Missouri, or Nebraska, the trade-in allowance is $3000.00, for all other states it is $ 2750.00.
For vehicles manufactured between 2000 and 2009 and initially registered in Illinois, Indiana, Iowa, Kansas, Michigan, Minnesota, Missouri, Nebraska, North Dakota, Ohio, South Dakota or Wisconsin, the trade-in allowance is $3250.00, for all other states it is $ 3000.00.
For vehicles manufactured in 2010 and after, the trade-in allowance is $5000.00, irrespective of the state of initial registration.
if (vehiclesYear <= 1999 || vehiclesYear >= 1990
& (stateNames.getSelectedItem() == "IL")
|| (stateNames.getSelectedItem() == "IN")
|| (stateNames.getSelectedItem() == "IA")
|| (stateNames.getSelectedItem() == "KS")
|| (stateNames.getSelectedItem() == "MI")
|| (stateNames.getSelectedItem() == "MN")
|| (stateNames.getSelectedItem() == "MO")
|| (stateNames.getSelectedItem() == "NE")) {
tradeIn = 3000.00;
} else {
tradeIn = 2750.00;
}
if (vehiclesYear >= 2000
& (stateNames.getSelectedItem() == "IL")
|| (stateNames.getSelectedItem() == "IN")
|| (stateNames.getSelectedItem() == "IA")
|| (stateNames.getSelectedItem() == "KS")
|| (stateNames.getSelectedItem() == "MI")
|| (stateNames.getSelectedItem() == "MN")
|| (stateNames.getSelectedItem() == "MO")
|| (stateNames.getSelectedItem() == "NE")
|| (stateNames.getSelectedItem() == "ND")
|| (stateNames.getSelectedItem() == "OH")
|| (stateNames.getSelectedItem() == "SD")
|| (stateNames.getSelectedItem() == "WI")) {
tradeIn = 3250.00;
} else {
tradeIn = 3000.00;
}
if (vehiclesYear >= 2010) {
tradeIn = 5000.00;
}