The purpose of this program that I'm writing is to calculate a user's total daily energy expenditure. However, for some reason, it's giving me a ton of errors regarding my boolean operators and "if-else-if" statements. I feel like I'm missing something obvious, could you guys help?:
import java.util.Scanner; public class TDEE { public static void main(String [] args) { double activityFactor; double TDEE; Scanner in = new Scanner(System.in); System.out.print("Please enter your name: "); String firstName = in.next(); String lastName = in.next(); System.out.println(firstName + " " + lastName); System.out.print("Please enter your BMR: "); double userBMR = in.nextDouble(); System.out.println(userBMR); System.out.print("Please enter your gender (M/F): "); String userGender = in.next(); System.out.println(userGender); System.out.println(); System.out.println("Select your Activity Level"); System.out.println("[A] Resting (Sleeping, Reclining)"); System.out.println("[B] Sedentary (Minimal Movement)"); System.out.println("[C] Light (Sitting, Standing)"); System.out.println("[D] Moderate (Light Manual Labor, Dancing, Riding Bike)"); System.out.println("[E] Very Active (Team Sports, Hard Manual Labor)"); System.out.println("[F] Extremely Active (Full-Time Athlete, Heavy Manual Labor)"); System.out.println(); System.out.print("Enter the letter corresponding to your activity level: "); String choice = in.next(); System.out.println(choice); if(choice.equalsIgnoreCase("A")) { activityFactor = 1.0; TDEE = userBMR * activityFactor; } else if (choice.equalsIgnoreCase("B")) { activityFactor = 1.3; TDEE = userBMR * activityFactor; } } else if (choice.equalsIgnoreCase("C")) && (userGender.equalsIgnoreCase("F")) { activityFactor = 1.5; TDEE = userBMR * activityFactor; } else if ((choice.equalsIgnoreCase("C")) && (userGender.equalsIgnoreCase("M"))) || ((choice.equalsIgnoreCase("D")) && (userGender.equalsIgnoreCase("F"))) { activityFactor = 1.6; TDEE = userBMR * activityFactor; } else if (choice.equalsIgnoreCase("D")) && (userGender.equalsIgnoreCase("M")) { activityFactor = 1.7; TDEE = userBMR * activityFactor; } else if (choice.equalsIgnoreCase("E")) && (userGender.equalsIgnoreCase("F")) { activityFactor = 1.9; TDEE = userBMR * activityFactor; } else if (choice.equalsIgnoreCase("E")) && (userGender.equalsIgnoreCase("M")) { activityFactor = 2.1; TDEE = userBMR * activityFactor; } else if (choice.equalsIgnoreCase("F")) && (userGender.equalsIgnoreCase("F")) { activityFactor = 2.2; TDEE = userBMR * activityFactor; } else if (choice.equalsIgnoreCase("F")) && (userGender.equalsIgnoreCase("M")) { activityFactor = 2.4; TDEE = userBMR * activityFactor; } else { System.out.println("You did not choose a valid menu option!"); } System.out.println(); System.out.print("Name: " + firstName + " " + lastName); System.out.println(" Gender: " + userGender); System.out.print("BMR: " + userBMR); System.out.println(" Activity Factor: " + activityFactor); System.out.print("TDEE: " + TDEE); }//end of main method }//end of class