using the following class make a driver class which outputs the patient health record Write a driver class (app) that prompts for the person’s data input, instantiates an object of class HeartRates and displays the patient’s information from that object by calling the DisplayPatientRecord, method. essentially make a main method which asks the user to manually enter the data using System; namespace A1Question2 { public class HealthProfile { // attibutes which holds the following value private String _FirstName; private String _LastName; private int _BirthYear; private double _Height; private double _Weigth; private int _CurrentYear; public HealthProfile(string firstName, string lastName, int birthYear, double height, double wt, int currentYear) { _FirstName = firstName; _LastName = lastName; _BirthYear = birthYear; _Height = height; _Weigth = wt; _CurrentYear = currentYear; } public string firstName { get; set; } public string lastName { get; set; } public int birthYear { get; set; } public int height { get; set; } public double weight { get; set; } public int currentYear { get; set; } public int Person_Age { get { return _CurrentYear - _BirthYear; } } public double Height { get { return _Height; } } public double Weight { get { return Weight; } } public int Max_Heart_Rate { get { return 220 - Person_Age; } } public double Min_Target_Heart_Rate { get { return Max_Heart_Rate * 0.65; } } public double Max_Target_Heart_Rate { get { return Max_Heart_Rate * 0.75; } } public double BMI { get { return (_Weigth / (Math.Pow(_Height, 2))) * 703; } } public string BMIEvaluation() { if (BMI < 18.5) return "Underweight"; else if (BMI < 25) return "Normal"; else if (BMI < 30) return "Overweight"; else return "Obese"; } } }
PLEASE help with the following C#.NET
using the following class make a driver class which outputs the patient health record
Write a driver class (app) that prompts for the person’s data input, instantiates an object of class HeartRates and displays the patient’s information from that object by calling the DisplayPatientRecord, method.
essentially make a main method which asks the user to manually enter the data
using System;
namespace A1Question2
{
public class HealthProfile
{ // attibutes which holds the following value
private String _FirstName;
private String _LastName;
private int _BirthYear;
private double _Height;
private double _Weigth;
private int _CurrentYear;
public HealthProfile(string firstName, string lastName, int birthYear, double height, double wt, int currentYear)
{
_FirstName = firstName;
_LastName = lastName;
_BirthYear = birthYear;
_Height = height;
_Weigth = wt;
_CurrentYear = currentYear;
}
public string firstName { get; set; }
public string lastName { get; set; }
public int birthYear { get; set; }
public int height { get; set; }
public double weight { get; set; }
public int currentYear { get; set; }
public int Person_Age
{
get { return _CurrentYear - _BirthYear; }
}
public double Height
{
get { return _Height; }
}
public double Weight
{
get { return Weight; }
}
public int Max_Heart_Rate
{
get { return 220 - Person_Age; }
}
public double Min_Target_Heart_Rate
{
get { return Max_Heart_Rate * 0.65; }
}
public double Max_Target_Heart_Rate
{
get { return Max_Heart_Rate * 0.75; }
}
public double BMI
{
get { return (_Weigth / (Math.Pow(_Height, 2))) * 703; }
}
public string BMIEvaluation()
{
if (BMI < 18.5)
return "Underweight";
else if (BMI < 25)
return "Normal";
else if (BMI < 30)
return "Overweight";
else
return "Obese";
}
}
}
Given:
using System;
namespace A1Question2
{
public class HealthProfile
{ // attibutes which holds the following value
private String _FirstName;
private String _LastName;
private int _BirthYear;
private double _Height;
private double _Weigth;
private int _CurrentYear;
public HealthProfile(string firstName, string lastName, int birthYear, double height, double wt, int currentYear)
{
_FirstName = firstName;
_LastName = lastName;
_BirthYear = birthYear;
_Height = height;
_Weigth = wt;
_CurrentYear = currentYear;
}
public string firstName { get; set; }
public string lastName { get; set; }
public int birthYear { get; set; }
public int height { get; set; }
public double weight { get; set; }
public int currentYear { get; set; }
public int Person_Age
{
get { return _CurrentYear - _BirthYear; }
}
public double Height
{
get { return _Height; }
}
public double Weight
{
get { return Weight; }
}
public int Max_Heart_Rate
{
get { return 220 - Person_Age; }
}
public double Min_Target_Heart_Rate
{
get { return Max_Heart_Rate * 0.65; }
}
public double Max_Target_Heart_Rate
{
get { return Max_Heart_Rate * 0.75; }
}
public double BMI
{
get { return (_Weigth / (Math.Pow(_Height, 2))) * 703; }
}
public string BMIEvaluation()
{
if (BMI < 18.5)
return "Underweight";
else if (BMI < 25)
return "Normal";
else if (BMI < 30)
return "Overweight";
else
return "Obese";
}
}
}
Step by step
Solved in 2 steps with 2 images