While each of us has had a reading of our blood pressure taken, many of us may not know what blood pressure actually means. Blood pressure is expressed as a ratio of the maximum (systolic) and minimum (diastolic) pressure found in the aorta during one cardiac cycle. These pressure values are measured in millimeters of mercury (mmHg). Determining abnormal blood pressure is critical for diagnosing and averting a number of serious health problems (e.g. heart disease and stroke). Doctors therefore make decisions about the potential for serious health problems based on a few simple calculations. One simple calculation of interest is mean arterial pressure (MAP). The mean arterial pressure is the average pressure during the cardiac cycle. The MAP of a normal, resting heart can be computed by the formula: MAP = DP + (1/3)PP where DP is the diastolic pressure and PP is the pulse pressure. Create a Java class file called MeanArterialPressure. This program will compute a user's mean arterial pressure based on two inputs: the diastolic pressure (a int value) and the pulse pressure (an int value). Once the input is complete, your program should echo-print the input values with descriptive messages, like so: Your diastolic pressure is 110 and your pulse pressure is: 60. Next, add code to your program to compute the mean arterial pressure. You will need to declare another variable (a double) to store the mean arterial pressure value. Once you have used the input values to compute the mean arterial pressure, output the result to the screen with a descriptive message and two digits of precision: Your diastolic pressure is 110 and your pulse pressure is: 60. Your mean arterial pressure is: 130.00. Next, you will add code to your program to detect a "low" mean arterial pressure. If the mean arterial pressure is below 60 mmHg, alert the user that he or she should seek medical assistance; else, inform the user that their mean arterial pressure is within acceptable limits. Use an if-else statement. For example: Your diastolic pressure is 110 and your pulse pressure is: 60. Your mean arterial pressure is: 130.00. Your mean arterial pressure is within acceptable limits. or Your diastolic pressure is 40 and your pulse pressure is: 40. Your mean arterial pressure is: 53.33. You should seek medical assistance.   Note #1: Follow the following Java Code Guidelines (when producing). Comments Each program must follow the Javadoc guidelines for documentation, including file-level and method-level comments. Each line that ends in a semicolon must have a comment in descriptive English. Additional descriptive comments are encouraged. Program Contents All primitive variables initialized. No “goto”, label, or "continue" statements are used. No use of "break" outside of a switch statement. Arrays are declared with the [ ] preceding the array name. Program Style All code indented three spaces within blocks (curly braces). Do NOT use tabs. All code must exhibit proper alignment of curly braces { } as modeled in class. All code must fit within 80 columns or less. Variable Names Variables named according to convention: Each variable name contains only letters or digits The first character in a variable name is a lowercase letter Constants named according to convention: Each constant contains only upper-case letters.   Note #2: Produce in Java language!

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter3: Assignment, Formatting, And Interactive Input
Section3.3: Using Mathematical Library Functions
Problem 8E: (Transportation) Road construction requires estimating the expected loads on a road’s pavement over...
icon
Related questions
Question

While each of us has had a reading of our blood pressure taken, many of us may not know what blood pressure actually means. Blood pressure is expressed as a ratio of the maximum (systolic) and minimum (diastolic) pressure found in the aorta during one cardiac cycle. These pressure values are measured in millimeters of mercury (mmHg).

Determining abnormal blood pressure is critical for diagnosing and averting a number of serious health problems (e.g. heart disease and stroke). Doctors therefore make decisions about the potential for serious health problems based on a few simple calculations. One simple calculation of interest is mean arterial pressure (MAP). The mean arterial pressure is the average pressure during the cardiac cycle. The MAP of a normal, resting heart can be computed by the formula:

MAP = DP + (1/3)PP

where DP is the diastolic pressure and PP is the pulse pressure.

Create a Java class file called MeanArterialPressure. This program will compute a user's mean arterial pressure based on two inputs: the diastolic pressure (a int value) and the pulse pressure (an int value). Once the input is complete, your program should echo-print the input values with descriptive messages, like so:

Your diastolic pressure is 110 and your pulse pressure is: 60.

Next, add code to your program to compute the mean arterial pressure. You will need to declare another variable (a double) to store the mean arterial pressure value. Once you have used the input values to compute the mean arterial pressure, output the result to the screen with a descriptive message and two digits of precision:

Your diastolic pressure is 110 and your pulse pressure is: 60.

Your mean arterial pressure is: 130.00.

Next, you will add code to your program to detect a "low" mean arterial pressure. If the mean arterial pressure is below 60 mmHg, alert the user that he or she should seek medical assistance; else, inform the user that their mean arterial pressure is within acceptable limits. Use an if-else statement. For example:

Your diastolic pressure is 110 and your pulse pressure is: 60.

Your mean arterial pressure is: 130.00.

Your mean arterial pressure is within acceptable limits.

or

Your diastolic pressure is 40 and your pulse pressure is: 40.

Your mean arterial pressure is: 53.33.

You should seek medical assistance.

 

Note #1Follow the following Java Code Guidelines (when producing).

Comments

  • Each program must follow the Javadoc guidelines for documentation, including file-level and method-level comments.
  • Each line that ends in a semicolon must have a comment in descriptive English.
    • Additional descriptive comments are encouraged.

Program Contents

  • All primitive variables initialized.
  • No “goto”, label, or "continue" statements are used.
  • No use of "break" outside of a switch statement.
  • Arrays are declared with the [ ] preceding the array name.

Program Style

  • All code indented three spaces within blocks (curly braces). Do NOT use tabs.
  • All code must exhibit proper alignment of curly braces { } as modeled in class.
  • All code must fit within 80 columns or less.

Variable Names

  • Variables named according to convention:
    • Each variable name contains only letters or digits
    • The first character in a variable name is a lowercase letter
  • Constants named according to convention:
    • Each constant contains only upper-case letters.

 

Note #2: Produce in Java language!

Expert Solution
Algorithm
  1. Prompt the user to input the diastolic pressure (DP) and pulse pressure (PP).

  2. Store the inputs as integer values.

  3. Calculate the MAP using the formula MAP = DP + (1/3)PP.

  4. Print the diastolic and pulse pressure inputs along with the calculated MAP.

  5. If the MAP is below 60 mmHg, print a message indicating the user should seek medical assistance.

  6. If the MAP is above or equal to 60 mmHg, print a message indicating that the MAP is within acceptable limits.

  7. End the program.

trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Fundamentals of Boolean Algebra and Digital Logics
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Enhanced Discovering Computers 2017 (Shelly Cashm…
Enhanced Discovering Computers 2017 (Shelly Cashm…
Computer Science
ISBN:
9781305657458
Author:
Misty E. Vermaat, Susan L. Sebok, Steven M. Freund, Mark Frydenberg, Jennifer T. Campbell
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning