I am fairly new to java and i'm trying to write this simple program to calculate the cost of admission for single and multiple employees.
this is the error message im getting about the operators in my conditional statements:
incomparable types: int and java.lang.String
Code
import java.text.*;
import java.util.Scanner;
class IMC {
public static void main(String[] args) {
int numEmployees = 0;
double costPerAttendee = 0.00;
double admissionPrice = 0.00;
Scanner keyboard = new Scanner (System.in);
System.out.print("Enter amount of employees attending: ");
numEmployees = keyboard.nextInt();
System.out.print("Have any employees attended previously? ");
employeeDiscount = keyboard.nextInt();
if (numEmployees == "1") {
admissionPrice = 695.00;
} else if (numEmployees == "2" || "3" || "4") {
admissionPrice = 545.00;
} else if (numEmployees >= "5" || "6" || "7" || "8") {
admissionPrice = 480.00;
} else if (numEmployees >= "9") {
admissionPrice = 395.00;
}
System.out.println("The cost per attendee is: " + admissionPrice );
}
}