public class Bill { public static double total (String type, double cost,boolean ship){ double total=0; //value of book after shipping and taxes if (type.substring(0,1).equals("st")){ cost=cost-cost*0.15; } else if (type.substring(0,0).equals("g")){ cost=cost-cost*0.10; } else if (type.substring(0,0).equals("s")){ cost=cost-cost*0.07; } else if (type.substring(0,0).equals("f")){ cost=cost-cost*0.05; } else if (type.substring(0,0).equals("o")){ cost=cost*1.0; } if (ship==true){ total=cost+10.00; }else{ total=cost; } total=total*1.13; return total; } }