Untitled

mail@pastecode.io avatar
unknown
plain_text
8 months ago
1.1 kB
6
Indexable
Never
 if(selectedFoodTypeBreakfast.equalsIgnoreCase("VEG")){
          foodTypeValueBreakfast = 1.250;
        }else {
          foodTypeValueBreakfast = 1.250;
        }

        if(selectedFoodTypeLunch.equalsIgnoreCase("VEG")){
            foodTypeValueLunch = 1.250;
        }else {
            foodTypeValueLunch = 1.250;
        }

        if(selectedFoodTypeDinner.equalsIgnoreCase("VEG")){
            foodTypeValueDinner = 1.250;
        }else {
            foodTypeValueDinner = 1.250;
        }
        totalPriceBreakfast = ((proteinCalValue * etProteinBreakfast) + (carbCalValue * etCarbsBreakfast) + (fatCalValue * etFatsBreakfast)) * foodTypeValueBreakfast;
        totalPriceLunch = ((proteinCalValue * etProteinLunch) + (carbCalValue * etCarbsLunch) + (fatCalValue * etFatsLunch)) * foodTypeValueLunch;
        totalPriceDinner = ((proteinCalValue * etProteinDinner) + (carbCalValue * etCarbsDinner) + (fatCalValue * etFatsDinner)) * foodTypeValueDinner;
        totalPrice = totalPriceBreakfast + totalPriceLunch + totalPriceDinner;
        totalPrice = Double.parseDouble(format.format(totalPrice));
Leave a Comment