예제 #1
0
        static void Main(string[] args)
        {
            ScoringAlgorithm algorithm;

            Console.WriteLine("Mans");
            algorithm = new MenScoringAlgorithm();
            Console.WriteLine(algorithm.GenerateScore(8, new TimeSpan(0, 2, 35)));

            Console.WriteLine("Women");
            algorithm = new WomensScoringAlgorithm();
            Console.WriteLine(algorithm.GenerateScore(8, new TimeSpan(0, 2, 15)));

            Console.WriteLine("Mans");
            algorithm = new ChildrenScoringAlgorithm();
            Console.WriteLine(algorithm.GenerateScore(8, new TimeSpan(0, 2, 35)));
        }
예제 #2
0
        static void Main(string[] args)
        {
            ScoringAlgorithm scoringAlgorithm;

            Console.WriteLine("Man");
            scoringAlgorithm = new MensScoringAlgorithm();
            Console.WriteLine(scoringAlgorithm.GenerateScore(10, new TimeSpan(0, 2, 34)));
            Console.WriteLine("Women");
            scoringAlgorithm = new WomensScoringAlgorithm();
            Console.WriteLine(scoringAlgorithm.GenerateScore(10, new TimeSpan(0, 2, 34)));
            Console.WriteLine("Child");
            scoringAlgorithm = new ChildrenScoringAlgorithm();
            Console.WriteLine(scoringAlgorithm.GenerateScore(10, new TimeSpan(0, 2, 34)));

            Console.ReadLine();
        }