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); }
private static double GetInsurancePremium() { var insuranceRules = new InsuranceRules(); return(insuranceRules.GetBaseInsurancePremium(_age)); }
private static void GetRiskType() { var insuranceRules = new InsuranceRules(); insuranceRules.GetRiskType(_age); }