Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

JAVA- Write a program that reads in a series of patient vitals and determines a health score based on those vitals. The following data will

JAVA- Write a program that reads in a series of patient vitals and determines a health score based on those vitals. The following data will be read from the input (all except name will be integers): Name Heart rate Respiratory rate Height (in inches) Weight (in pounds) Systolic pressure (top number of blood pressure reading) Diastolic pressure (bottom number of blood pressure reading)

Details There are an unknown number of patient records. Use Scanner.hasNext() to continue reading input until all records have been processed. You must validate for each patient record that all vitals are positive, nonzero integers. If any data point is not valid according to this criteria, print the message Invalid record! and do no calculations. Each patient will be given a health score between 1 and 5, displayed as a series of asterisks (e.g. *** for a score of 3). To calculate the health score, determine how many of the vitals are within the healthy ranges below. If all vitals are healthy, the patient receives a score of 5. If no vitals are within the healthy range, the patient receives a score of 1. For each unhealthy vital, print !! before that measurement in the output. Using the patients height and weight, you must calculate their body mass index (BMI), formatted to 1 decimal place. The formula for BMI is as follows: BMI = weight in kg / (height in meters * height in meters) (1 kilogram = 0.453592 pounds) (1 inch = 0.0254 meters) Healthy ranges for vitals: Heart rate: 60 <= rate <= 100 Respiratory rate: 12 <= rate <= 18 BMI: 18.5 <= bmi <= 25.0 Systolic pressure: 90 <= p <= 120 Diastolic pressure: 60 <= p <= 80 Program Structure You are required to use at least two methods: 1) your main method, and 2) a method for calculating BMI. If possible, do this program WITHOUT using FLAGS.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions

Question

find all matrices A (a) A = 13 (b) A + A = 213

Answered: 1 week ago