Create a Java class file called PulsePressureIST140. This program will compute a user's pulse pressure based on two inputs: the systolic pressure (a int value) and the diastolic pressure (an int value). Once the input is complete, your program should echo-print the input values with descriptive messages, like so: You entered a pressure of 120 / 80. Next, add code to your program to compute the pulse pressure. You will need to declare another variable (an int) to store the pulse pressure value. Once you have used the input values to compute the pulse pressure, output the pulse pressure to the screen with a descriptive message: You entered a pressure of 120 / 80. Your pulse pressure is: 40. Next, you will add code to your program to detect a "high" pulse pressure. If the pulse pressure is greater than 80 mmHg, inform the user that their pulse pressure is high. Use a simple if statement (no else clause). For example: You entered a pressure of 170 / 80. Your pulse pressure is: 90. Your pulse pressure is high.

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 pulse pressure (PP). The pulse pressure of an individual can be computed as the difference between the systolic and diastolic pressures.

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

You entered a pressure of 120 / 80.

Next, add code to your program to compute the pulse pressure. You will need to declare another variable (an int) to store the pulse pressure value. Once you have used the input values to compute the pulse pressure, output the pulse pressure to the screen with a descriptive message:

You entered a pressure of 120 / 80. Your pulse pressure is: 40.

Next, you will add code to your program to detect a "high" pulse pressure. If the pulse pressure is greater than 80 mmHg, inform the user that their pulse pressure is high. Use a simple if statement (no else clause). For example:

You entered a pressure of 170 / 80. Your pulse pressure is: 90. Your pulse pressure is high.

Don't forget to follow the Java Coding Guidelines (shown below):

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.

Use this template:

import java.util.Scanner;
 
/**
  *   
  *
  *   @author 
  *   @version 
  */
 
public class PulsePressureIST140
{
   /**
     *  Entry point for the program.
 *
 *  @param args The command-line arguments for the program.
     */
 
   public static void main(String [] args)
{
 
   }
}
 
NOTE: Write in Java language!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Knowledge Booster
Constants and Variables
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