public static float calcCommission (float salesAmount){
    double dcommission = 0; 
    float fcommission = 0; 
    if (salesAmount < 200) { 
       dcommission = salesAmount * 0.03; 
       fcommission = (float)dcommission; 
    } else if (salesAmount >= 200 && salesAmount < 500) {
        dcommission = salesAmount * 0.06; 
        fcommission = (float)dcommission; 
    } else if (salesAmount >= 500 && salesAmount < 1000) {
        dcommission = salesAmount * 0.08; 
        fcommission = (float)dcommission; 
    } else {
        dcommission = salesAmount * 0.10; 
        fcommission = (float)dcommission; 
    }
    return fcommission;
}