import java.util.Scanner;
public class Lab8_Ex2
{
public static void main(String[] args)
{
int age;
int beatsPerMinute;
Scanner keyboard = new Scanner(System.in);
System.out.print("Please enter your age. ");
age = keyboard.nextInt();
System.out.print("Please enter the number of heartbeats " +
"counted in one minute. ");
beatsPerMinute = keyboard.nextInt();
heartRate = targetHeartRate(heartRate);
if(heartRate == true)
{
System.out.print("You are in your target heart rate.");
}
else
{
System.out.print("You are not in your target heart rate.");
}
}
public static boolean targetHeartRate(int age, int beatsPerMinute)
{
int maxHeartRate = 0;
double targetRate = 0.0;
boolean heartRate;
maxHeartRate = 220 - age;
targetRate = maxHeartRate * .65;
if(targetRate == beatsPerMinute)
{
heartRate = true;
}
else
{
heartRate = false;
}
return heartRate;
}
}[/CODE]
What did I do wrong?