Exemple #1
0
        static void Main(string[] args)
        {
            ScoringAlgorithm scoringAlgorithm;

            Console.WriteLine("Mans");
            scoringAlgorithm = new MensScoringAlgorithm();
            Console.WriteLine(scoringAlgorithm.GenerateScore(10, new TimeSpan(0, 2, 34)));
            Console.WriteLine("Woman");
            scoringAlgorithm = new WomanScoringAlgorithm();
            Console.WriteLine(scoringAlgorithm.GenerateScore(10, new TimeSpan(0, 2, 34)));
            Console.WriteLine("Children");
            scoringAlgorithm = new ChildrenScoringAlgorithm();
            Console.WriteLine(scoringAlgorithm.GenerateScore(10, new TimeSpan(0, 2, 34)));
            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            ScoringAlgorithm algorithm;

            Console.WriteLine("mans");
            algorithm = new MensScoringAlgorithm();
            Console.WriteLine(algorithm.GenerateScore(8, new TimeSpan(0, 2, 34)));

            Console.WriteLine("Womens");
            algorithm = new WomenScoringAlgorithm();
            Console.WriteLine(algorithm.GenerateScore(8, new TimeSpan(0, 2, 10)));

            Console.WriteLine("Children");
            algorithm = new ChildrenScoringAlgorithm();
            Console.WriteLine(algorithm.GenerateScore(8, new TimeSpan(0, 2, 35)));
        }