COIT20245 Assignment 1 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...

1 answer below »

COIT20245


Assignment 1


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.


Submission


You are to submit a zipped folder containing


· Your zipped NetBeans project folder. Details of how to do this are available in the NetBeans FAQ on the unit website.


· Report.docx. This file is to contain the following Sections:


1. Limitations


2. Test plan


3. Test results


Student name, student ID number, unit name and unit code are to be included on the title page., a test plan and test results.


The limitations section is to specify any limitations that your program has in terms of calculations and data validation. With respect to data validation, note that the only validation that you are
required
to do is to check whether the SBP is greater than the DBP.


The test plan is to contain a comprehensive list of program functionality to be tested, the input values to be used to test each item of functionality, the expected output from the test and the actual output from the test. Note that because MAP is calculated as a floating point value, we can’t (in general) test it for equality. What this means in terms of your test plan is that you do
not
need to test the category end points


The test results section is to contain screenshots to demonstrate that the program generates the actual outputs shown in the test plan.







Marking Criteria





























































































































Criteria







Marks Allocated




1.




Calculation of results



/3




1




Language use



/7






Variable declarations









Class definition/object creation









Loop control










Selection statement use









Method definition and use









Reading input












Display of results







2




Layout and documentation









Spacing and indentation conventions



/1






Naming conventions



/1






Comments



/3



3




Report










Limitations



/1






Test Plan and Test Results



/4







Sub-Total



/20







Penalties










Does not compile: up to 20 marks










Partial implementation: up to 20 marks










Late submission : 5% (1 mark) / day or part of a day










Total



/20





For Language Use, a checklist is given, but not a detailed marks breakdown. For checklist item non-compliance, you will be penalised 0.5 – 1 mark depending on the degree of non-compliance.


Note that it is your responsibility to ensure that source code files are included in your submission as well as report.docx. If either are missing, the assignment will not be marked.
Answered Same DayApr 09, 2021COIT20245Central Queensland University

Answer To: COIT20245 Assignment 1 Assessment Task You are to develop a Java console application using the...

Abhishek answered on Apr 10 2021
144 Votes
38658 - MAP/Report.pdf
Limitations:
Our application is calculating the MAP correctly and the only limitation in our applications that
only a double value must be entered while sbp and dbp are taken from the user. If any string or
any invalid symbol is entered, our application will crash and the program will be terminated at the
same time.
The required validation that sbp is always greater than the DBP is working fine and we have
already tested it for various inputs.
Test Plan

S
no.
Description Inputs Expected Output Actual Output
1 This test case checks the
validation condition. If the
SBP is lower than DBP, the
program must print the
error message.
Name: User 1
SBP : 13
DBP : 45
Please make sure that
SBP is greater than
DBP.
Please make sure that
SBP is greater than
DBP.
2 This program tests the
case where the MAP is in
the low category. The
program calculates the
MAP correctly and prints
that the MAP is in low
category.
Name: User 2
SBP : 56
DBP : 45
NAME : User 2
SBP : 56.0
DBP : 45.0
MAP : 48.7
CATEGORY : low
NAME : User 2
SBP : 56.0
DBP :
45.0
MAP : 48.7
CATEGORY : low
3 This program tests the
case where the MAP is in
the normal category. The
program calculates the
MAP correctly and prints
that the MAP is in normal
category.
Name: User 3
SBP : 78
DBP : 66
NAME : User 3
SBP : 78.0
DBP : 66.0
MAP : 70.0
CATEGORY : normal
NAME : User 3
SBP : 78.0
DBP : 66.0
MAP : 70.0
CATEGORY : normal
4 This test case checks the
validation condition. If the
SBP is lower than DBP, the
program must print the
error message.
Name: User 4
SBP : 100
DBP : 120
Please make sure that
SBP is greater than
DBP.
Please make sure that
SBP is greater than
DBP.
5 This program tests the
case where the MAP is in
the high category. The
program calculates the
MAP correctly and prints
that the MAP is in high
category.
Name: User 5
SBP : 120
DBP : 110
NAME : User 5
SBP : 120.0
DBP : 110.0
MAP : 113.3
CATEGORY : high
NAME : User 5
SBP : 120.0
DBP : 110.0
MAP : 113.3
CATEGORY : high
6 This test case checks the
output when SBP and DBP
are equal
Name: User 6
SBP : 90
DBP : 90
NAME : User 6
SBP : 90.0
DBP : 90.0
MAP : 90.0
CATEGORY : normal
NAME : User 6
SBP : 90.0
DBP : 90.0
MAP : 90.0
CATEGORY : normal
7 The test case to check the
MAP in low category.
Name: User 7
SBP : 45
DBP : 34
NAME : User 7
SBP : 45.0
DBP : 34.0
MAP : 37.7
CATEGORY : low
NAME : User 7
SBP : 45.0
DBP : 34.0
MAP : 37.7
CATEGORY : low
8 Data Summary report is
printed correctly.
NA Data Summary Report
Lowest MAP value :
37.7
Highest MAP value :
113.3
Average MAP value :
71.9
Data Summary Report
Lowest MAP value :
37.7
Highest MAP value :
113.3
Average MAP value :
71.9
Test Results:
1. Screenshot1:
2. Screenshot2
38658 - MAP/Report.docx
Limitations:
Our application is calculating the MAP correctly and the only limitation in our applications that only a double value must be entered while sbp and dbp are taken from the user. If any string or any invalid symbol is entered, our application will crash and the program will be terminated at the same time.
The required validation that sbp is always greater than the DBP is working fine and we have already tested it for various inputs.
Test Plan
        S no.
        Description
        Inputs
        Expected Output
        Actual Output
        1
        This test case checks the validation condition. If the SBP is lower than DBP, the program must print the error message.
        Name: User 1
SBP : 13
DBP : 45
        Please make sure that SBP is greater than DBP.
        Please make sure that SBP is greater than DBP.
        2
        This program tests the case where the MAP is in the low category. The program calculates the MAP correctly and prints that the MAP is in low category.
        Name: User 2
SBP : 56
DBP : 45
        NAME : User 2
SBP : 56.0
DBP : 45.0
MAP : 48.7
CATEGORY : low
        NAME : User 2
SBP : 56.0
DBP : 45.0
MAP : 48.7
CATEGORY : low
        3
        This program tests the case where the MAP is in the normal category. The program calculates the MAP correctly and prints that the MAP is in normal category.
        Name: User 3
SBP : 78
DBP : 66
        NAME : User 3
SBP : 78.0
DBP : 66.0
MAP : 70.0
CATEGORY : normal
        NAME : User 3
SBP : 78.0
DBP : 66.0
MAP : 70.0
CATEGORY : normal
        4
        This test case checks the validation condition. If the SBP is lower than DBP, the program must print the error message.
        Name: User 4
SBP : 100
DBP : 120
        Please make sure that SBP is greater than DBP.
        Please make sure that SBP is greater than DBP.
        5
        This program tests the case where the MAP is in the high category. The program calculates the MAP correctly and prints that the MAP is in high category.
        Name: User 5
SBP : 120
DBP : 110
        NAME : User 5
SBP : 120.0
DBP : 110.0
MAP : 113.3
CATEGORY : high
        NAME : User 5
SBP : 120.0
DBP : 110.0
MAP : 113.3
CATEGORY : high
        6
        This test case checks the output when SBP and DBP are equal
        Name: User 6
SBP : 90
DBP : 90
        NAME : User 6
SBP : 90.0
DBP : 90.0
MAP : 90.0
CATEGORY : normal
        NAME : User 6
SBP : 90.0
DBP : 90.0
MAP : 90.0
CATEGORY : normal
        7
        The test case to check the MAP in low category.
        Name: User 7
SBP : 45
DBP : 34
        NAME : User 7
SBP : 45.0
DBP : 34.0
MAP : 37.7
CATEGORY : low
        NAME : User 7
SBP : 45.0
DBP : 34.0
MAP : 37.7
CATEGORY : low
        8
        Data Summary report is printed correctly.
        NA
        Data Summary Report
Lowest MAP value : 37.7
Highest MAP value : 113.3
Average MAP value : 71.9
        Data Summary Report
Lowest MAP value : 37.7
Highest MAP value : 113.3
Average MAP value : 71.9
Test Results:
1. Screenshot1:
2. Screenshot2
38658 - MAP/Screenshots/O2.png
38658 - MAP/Screenshots/O1.png
38658 - MAP/Problem/assignment1-java-oj1desg4.docx
COIT20245
Assignment 1
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.
Submission
You are to submit a zipped folder containing
· Your zipped NetBeans project folder. Details of how to do this are available in the NetBeans FAQ on the unit website.
· Report.docx. This file is to contain the following Sections:
1. Limitations
2. Test plan
3. Test results
Student name, student ID number, unit name and unit code are to be included on the title page., a test plan and test results.
The limitations section is to specify any limitations that your program has in terms of calculations and data validation. With respect to data validation, note that the only validation that you are required to do is to check whether the SBP is greater than the DBP.
The test plan is to contain a comprehensive list of program functionality to be tested, the input values to be used to test each item of functionality, the expected output from the test and the actual output from the test. Note that because MAP is calculated as a floating point value, we can’t (in general) test it for equality. What this means in terms of your test plan is that you do not need to test the category end points
The test results section is to contain screenshots to demonstrate that the program generates the actual outputs shown in the test plan.
Marking Criteria
        
        Criteria
        Marks Allocated
        1.
        Calculation of results
        /3
        1
        Language use
         /7
        
         Variable declarations
        
        
         Class definition/object creation
        
        
         Loop control
        
        
         Selection statement use
        
        
         Method definition and use
        
        
         Reading input
        
        
         Display of results
        
         2
        Layout and documentation
        
        
         Spacing and indentation conventions
        /1
        
         Naming conventions
        /1
        
         Comments
        /3
        3
        Report
        
        
         Limitations
        /1
        
         Test Plan and Test Results
        /4
        
        Sub-Total
        /20
        
        Penalties
        
        
         Does not compile: up to 20 marks
        
        
         Partial implementation: up to 20 marks
        
        
         Late submission : 5% (1 mark) / day or part of a day
        
        
        Total
        /20
For Language Use, a checklist is given, but not a detailed marks breakdown. For checklist item non-compliance, you will be penalised 0.5 – 1 mark depending on the degree of non-compliance.
Note that it is your responsibility to ensure that source code files are included in your submission as well as report.docx. If either are missing, the assignment will not be marked.
38658 - MAP/Netbeans Project/MeanArtificialPressureProject/manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
38658 - MAP/Netbeans Project/MeanArtificialPressureProject/build.xml

Builds, tests, and runs the project MeanArtificialPressureProject.


38658 - MAP/Netbeans Project/MeanArtificialPressureProject/src/Assignment1.java
38658 - MAP/Netbeans...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here