using the follwoing class make a driver class which outputs the patient healthr 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 A1Question1 { class HeartRates { //class attributes private private string _First_Name; private string _Last_Name; private int _Birth_Year; private int _Current_Year; // Constructor which receives private parameters to initialize variables public HeartRates(string First_Name, string Last_Name, int Birth_Year, int Current_Year) { _First_Name = First_Name; _Last_Name = Last_Name; _Birth_Year = Birth_Year; _Current_Year = Current_Year; } // Auto-Implemented mutators and accessor public string First_Name { get; set; } public string Last_Name { get; set; } public int Birth_Year { get; set; } public int Current_Year { get; set; } // method/property to calculate the person age public int Person_Age { get { return _Current_Year - _Birth_Year; } } // method/property to calculate the person Max Heart Rate public int Max_Heart_Rate { get { return 220 - Person_Age; } } //method/ property to calculate the person Minimum target heart rate public double Min_Target_Heart_Rate { get { return Max_Heart_Rate * 0.65; } } // method / property to calculate the person Maximum target heart rate public double Max_Target_Heart_Rate { get { return Max_Heart_Rate * 0.75; } } } }
PLEASE help with the following C#.NET
using the follwoing class make a driver class which outputs the patient healthr 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 A1Question1
{
class HeartRates
{
//class attributes private
private string _First_Name;
private string _Last_Name;
private int _Birth_Year;
private int _Current_Year;
// Constructor which receives private parameters to initialize variables
public HeartRates(string First_Name, string Last_Name, int Birth_Year, int Current_Year)
{
_First_Name = First_Name;
_Last_Name = Last_Name;
_Birth_Year = Birth_Year;
_Current_Year = Current_Year;
}
// Auto-Implemented mutators and accessor
public string First_Name { get; set; }
public string Last_Name { get; set; }
public int Birth_Year { get; set; }
public int Current_Year { get; set; }
// method/property to calculate the person age
public int Person_Age
{
get { return _Current_Year - _Birth_Year; }
}
// method/property to calculate the person Max Heart Rate
public int Max_Heart_Rate
{
get { return 220 - Person_Age; }
}
//method/ property to calculate the person Minimum target heart rate
public double Min_Target_Heart_Rate
{
get { return Max_Heart_Rate * 0.65; }
}
// method / property to calculate the person Maximum target heart rate
public double Max_Target_Heart_Rate
{
get { return Max_Heart_Rate * 0.75; }
}
}
}
Step by step
Solved in 2 steps with 2 images