Hai, can anyone help me?
missing return statement error keep appear when i tried to run this code
class CoffeeBags{
//Data member
private static final double PRICE_PER_LB = 5.99;
private static final double TAX_RATE = 0.0725;
private int numberOfBags;
private double totalPrice;
private double totalPriceWithTax;
private int bagWeight;
//constructor
public CoffeeBags (double totalPrice, double totalPriceWithTax){
//double totalPrice=0.0;
}
//get method
public double getTotalPrice(){
return totalPrice;
}
public double getTotalPriceWithTax(){
return totalPriceWithTax;
}
//set method
public double settotalPrice(){
totalPrice = bagWeight * numberOfBags * PRICE_PER_LB;
}
public double settotalPriceWithTax(){
totalPriceWithTax = totalPrice + totalPrice * TAX_RATE;
}
}