Starting from:
$30

$24

Health Records Hw2 Solution

Write a C# windows application to track patients information and calculate the BMI and the health status of patients at a doctor office. The code must meet the following requirements: 
    1. Use classes to store patient information, where each patient information is stored as an object. 
    2. Patient information is read from a file into an  array or an array list
    3. Add at least two more attributes to the following attributes about each patient: 
 class client
    {
        //data 
        private string fname;
        private string lname;
        private string gender;
        private double height;
        private double weight;
        private int birthYear;
  private int birthMonth; //randomly generated 
      private int birthDay;
  private double bmi; 
  private string  healthStatus; 
 ….
}
 

    4. Perform at least one validation of input entered by the user or file inputs.    E.g.: check the validity of the value for birthYear to be valid        
    5. Use a consistent upper or lower case for attributes such as gender being “M” or “F” or have a combo box (or other controls) to select the value from a list.
    6. Use a random number generator to generate one needed value for the code. For example, randomly generate the birthMonth as a value between 1 and 12     
    7. Add set and get methods as needed.
    8. Code at least two constructors to demonstrate your understanding of constructor overloading 
    9. Use the keyword "this" in at least one occasion     
    10. Perform I/O to and from various  controls on the monitor
    11. Use colors, fonts and other attributes to display a nice user interface on the form. 
    12. Calculate the value of  BMI (see below) and health status as one of the following:  
                 
Health Status 
BMI Value 
The Health Status of the person 
Less than 18.5 
Underweight 
Equal to or greater than  18.5 but  less than  25  
Normal 
Equal to or greater than 25 but  less than  30  
Overweight 
Equal to or greater than 30 
Obesse 
 

Given the weight and height of a person, the following console statement prints the BMI: 
 Console.WriteLine("BMI: " + (weight / Math.Pow(height, 2)) * 703);


A partial  sample form may look like the one below  before adding colors, fonts...and other beautifying features: 

More products