This is probably a stupid mistake but I can't see the issue, it's with the if statement at the bottom:
/**
* Write a description of class Order here.
*
* @author David Taylor
* @version 1.0
*/
import javax.swing.*;
import java.text.DecimalFormat;
public class Client
{
// instance variables - replace the example below with your own
private String surname;
private double height;
private double weight;
private int age;
private boolean smoker;
/**
* Constructor for objects of class Client
*/
public Client()
{
surname="";
height= 0;
weight=0;
age=0;
smoker = false;
}
public Client(String name, double personHeight, double personWeight, int personAge, boolean isSmoker)
{
surname = name;
height = personHeight;
weight = personWeight;
age = personAge;
smoker = isSmoker;
}
/**
* Getter methods for class Client
*/
public String getSurname()
{
return surname;
}
public double getHeight()
{
return height;
}
public double getWeight()
{
return weight;
}
public int getAge()
{
return age;
}
public boolean getSmoker()
{
return smoker;
}
/**
* Setter methods for class Client
*/
public void setHeight(double personHeight)
{
height = personHeight;
}
public void setWeight(double personWeight)
{
weight = personWeight;
}
public void setAge(int personAge)
{
age = personAge;
}
public void setSmoker(boolean isSmoker)
{
smoker = isSmoker;
}
/**
* Calculate BMI and into Weight
*/
public double calcBMI()
{
double BMI;
BMI = weight / (height * height);
return BMI;
}
/**
* Calculate age group
*/
public String calcAge()
{
if (age >=60) {
return "senior";
}
else if (age >18) {
return "adult";
}
else if (age <18) {
return "junior";
}
}
}