예제 #1
0
        private static double GetCover(string question, string cover)
        {
            var        insuranceRules = new InsuranceRules();
            ConsoleKey response;

            do
            {
                Console.Write(question);
                response = Console.ReadKey(false).Key;
                if (response != ConsoleKey.Enter)
                {
                    Console.WriteLine();
                }
            } while (response != ConsoleKey.Y && response != ConsoleKey.N);

            switch (response)
            {
            case ConsoleKey.Y:
                return(insuranceRules.AddExtraCover(cover));

                break;

            case ConsoleKey.N:
                break;
            }

            return(0.00);
        }
예제 #2
0
        private static double GetInsurancePremium()
        {
            var insuranceRules = new InsuranceRules();

            return(insuranceRules.GetBaseInsurancePremium(_age));
        }
예제 #3
0
        private static void GetRiskType()
        {
            var insuranceRules = new InsuranceRules();

            insuranceRules.GetRiskType(_age);
        }