Exemplo n.º 1
0
        protected void btnSubmit_Click(object sender, EventArgs e)
        {
            CalcPremiumClass c1 = new CalcPremiumClass();
            int    age          = int.Parse(txtAge.Text);
            string gender       = txtGender.Text;

            DisplayAge.Text     += age.ToString();
            DisplayGender.Text  += gender;
            DisplayPremium.Text += "€" + c1.CalcPremium(age, gender).ToString();
        }
Exemplo n.º 2
0
        public float CheckPremium(int age, string gender)
        {
            float actualResult = c1.CalcPremium(age, gender);

            return(actualResult);
        }