Example #1
0
        public void Problem6()
        {
            double dogWeight;

            SmallDog mySmall = new SmallDog();
            MedDog   myMed   = new MedDog();
            LargeDog myLarge = new LargeDog();

            Console.WriteLine("To figure out your dog's age compared to a human's age, please enter your dog's weight and press 'Enter'.");
            dogWeight = double.Parse(Console.ReadLine());
            Console.WriteLine("");

            {
                if (dogWeight <= 20)
                {
                    mySmall.ageList();
                    mySmall.dogYears();
                }
                else if (dogWeight >= 21 && dogWeight <= 49)
                {
                    myMed.ageList();
                    myMed.dogYears();
                }
                else if (dogWeight >= 50)
                {
                    myLarge.ageList();
                    myLarge.dogYears();
                }
            }
        }
Example #2
0
        public void Question6()
        {
            SmallDog dogYears = new SmallDog();

            dogYears.ReadData();
        }