Exemple #1
0
        static void Main(string[] args)
        {
            int    id_person = Person.Create_ID();
            string your_gender, your_name, your_age_s, your_height_s, your_weight_s;
            int    your_age, your_height, your_weight;

            Console.WriteLine("Input your gender : ");
            your_gender = Console.ReadLine();
            while (your_gender != "man" && your_gender != "woman")
            {
                your_gender = Console.ReadLine();
            }
            Console.WriteLine("Input your name : ");
            your_name = Console.ReadLine();
            Console.WriteLine("Input your age");
            your_age_s = Console.ReadLine();
            while (!Int32.TryParse(your_age_s, out your_age))
            {
                your_age_s = Console.ReadLine();
            }
            Console.WriteLine("Input your height");
            your_height_s = Console.ReadLine();
            while (!Int32.TryParse(your_height_s, out your_height))
            {
                your_height_s = Console.ReadLine();
            }
            Console.WriteLine("Input your weight");
            your_weight_s = Console.ReadLine();
            while (!Int32.TryParse(your_weight_s, out your_weight))
            {
                your_weight_s = Console.ReadLine();
            }

            Person human = new Person(your_gender, your_age, your_name, your_weight, your_height, id_person);

            for (int i = 0; i < 7; i++)
            {
                Console.WriteLine("What is your palne on " + i + "day?");
                human[i] = Console.ReadLine();
            }

            human.CalcualtorWeight();
            human.Plan(human.Diagnosis(human.CalculatorWeight(72, 185)));
            human.Sleep();
            human.InformationTrain();
            human.InforamationPerson();
        }