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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education