Ejemplo n.º 1
0
 public ParagraphCreator(HomePageInputs inputs)
 {
     Outputs  = new ResultOutputs();
     m_Inputs = inputs;
     Outputs.TotalActivity = CalculateTotalActivity(m_Inputs.VoluntaryFitness, m_Inputs.WorkFitness);
     Outputs.Bmr           = CalculateBMR(m_Inputs.Height, m_Inputs.Weight, m_Inputs.Gender, m_Inputs.Age);
     Outputs.Tdee          = CalculateTdee(Outputs.Bmr, Outputs.TotalActivity);
     Outputs.Paragraph     = CreateParagraph(m_Inputs);
 }
Ejemplo n.º 2
0
 public ParagraphCreator(HomePageInputs inputs)
 {
     Outputs  = new ResultOutputs();
     m_Inputs = inputs;
     Outputs.TotalActivity  = CalculateTotalActivity(m_Inputs.VoluntaryFitness, m_Inputs.WorkFitness);
     Outputs.Bmr            = CalculateBMR(m_Inputs.Height, m_Inputs.Weight, m_Inputs.Gender, m_Inputs.Age);
     Outputs.Tdee           = CalculateTdee(Outputs.Bmr, Outputs.TotalActivity);
     Outputs.Paragraph      = CreateParagraph(m_Inputs);
     Outputs.Caloric        = CalculateCaloricIntake(Outputs.Tdee, inputs.PrimaryGoal);
     Outputs.GramsFat       = (int)((Outputs.Tdee * .3) / 9);
     Outputs.GramsProtein   = (int)((Outputs.Tdee * .3) / 4);
     Outputs.GramsCarbs     = (int)((Outputs.Tdee * .4) / 4);
     Outputs.PrimaryGoal    = GoalToString(inputs.PrimaryGoal);
     Outputs.CaloricPercent = CalculateCaloricPercent(inputs.PrimaryGoal);
 }