COIT20245 | Introduction to Programming | Programming

Home Recent Questions COIT20245 | Introduction to Programming | Programming

Assessment Task
You are to develop a Java console application using the NetBeans 8.2 IDE. The application is to calculate and classify MAP (Mean Arterial Pressure) for a randomised subset of individuals in a clinical trial. The number of individuals in the subset is not fixed, but will be in the range 5-10.
MAP is determined from an individual’s blood pressure using the following formula:

MAP = 1.0/3.0 * SBP + 2.0/3.0 * DBP
where
    • MAP is the mean arterial pressure,
    • SBP is the systolic blood pressure, and
    • DBP is the diastolic blood pressure.

Normal blood pressure for a healthy adult is typically between 90 mmHg and 120 mmHg for systolic blood pressure and between 60 mmHg and 80 for diastolic blood pressure. The normal mean arterial pressure in healthy patients should be in the range of between 70 and 100 mmHg.

For each person in the trial, you are to enter their identifier, together with their SBP (in mmHg) and DBP (in mmHg). SBP is always greater than DBP; if this is not the case, an error message is to be displayed and no processing is to be performed for that particular record. The identifier is an integer in the range 1-100. Blood pressures are to be stored in variables of type double. The application is to then calculate and display the trial identifier and the MAP value, together with a message indicating whether the MAP value is high, normal or low. When all data has been entered, a summary report consisting of
    1. The lowest MAP value
    2. The highest MAP value
    3. The average MAP value

is to be displayed. Values are to be displayed to one decimal place, e.g. 10.1, NOT 10.123456789.
Only language constructs covered in weeks 1-6 are to be used. In particular, the use of arrays will be penalised.

The application is to use the following classes and methods:
public class MAPCalculator {
   
    public MAPCalculator() {
    // no code required
    }
   
    public double value(double sbp, double dbp) {
        // return MAP value
    }
   
    public String category(double map) {
        // return one of “high”, “normal” or “low”
    }
   
}

public class Assignment1 {
      public static void main(String[] args) {
           // create scanner object
        // create MAP calculator
        // read and process records
        // display summary results
      }
}
The classes are to be included in your NetBeans project in two separate source files – Assignment1.java and MAPCalculator.java.

Search Here

Latest Reviews

  • Kannon
    13 Jul, 2019

    I asked for essay help from Assignment Help 4 Me and I am happy that the essay writers completed my task on time. The prices they asked for are worth in comparison to the services rendered.

  • Liam
    13 Jul, 2019

    Assignment Help 4 Me is the best help provider. I took assistance to get my essay completed and I am glad that the writers delivered the quality content as they promised within the time committed.

  • Silas
    12 Jul, 2019

    Accounting is a very interesting subject but when it comes to assignment writing, I feel hard to get through the same. But, since the assignments have to be completed somehow, I preferred to avail online help from Assignment Help 4 Me. All thanks to them that they helped me complete my work on time at reasonable prices.

View All Reviews

Facebook

Assignment Help 4 Me