I have the code below in a class, when I call the method e.g. patient1.monitorBloodPressure and if the blood pressure is set to for example 139 it will still read Blood Pressure level normal it will not go down the if else if ladder, am I blocking the code or have I written it in the wrong order?
public void monitorBloodPressure() { if (bloodPressure<120) { System.out.println("Blood Pressure Level Normal"); } else if (bloodPressure>=120||bloodPressure<=139) { System.out.println("HEALTH WARNING - High Blood Pressure - Prehypertension"); } else if (bloodPressure>=140||bloodPressure<=159) { System.out.println("HEALTH WARNING - High Blood Pressure - Hypertension Stage 1"); } else if (bloodPressure>=160||bloodPressure<=179) { System.out.println("HEALTH WARNING - High Blood Pressure - Hypertension Stage 2"); } else if (bloodPressure>=180) { System.out.println("HEALTH WARNING - High Blood Pressure - Hypertensive Crisis - Emergency Care Needed"); } else { System.out.println("Error"); } }
Thanks