Example #1
0
 public bool Compare(IInfluenceFactor factor)
 {
     if (((QuantitativeFactor)factor).TypeOfQuantitative == this.TypeOfQuantitative)
     {
         return(true);
     }
     return(false);
 }
 public bool Compare(IInfluenceFactor factor)
 {
     if (((BracketFactor)factor).TypeOfBracket == this.TypeOfBracket)
     {
         return(true);
     }
     return(false);
 }
Example #3
0
 public bool Compare(IInfluenceFactor factor)
 {
     if (((OptionalFactor)factor).TypeOfOptional == this.TypeOfOptional)
     {
         return(true);
     }
     return(false);
 }
        public void AddQuestion(IInfluenceFactor question)
        {
            foreach (var item in Questions.FindAll(delegate(IInfluenceFactor factor) { return(factor.TypeOfFactor == question.TypeOfFactor); }))
            {
                if (item.Compare(question))
                {
                    Console.WriteLine("This question already exists");
                }
            }

            Console.WriteLine("Ready to add questions");
        }
        public float ProcessQuestion(IInfluenceFactor question, int age, float modifier, string input)
        {
            question.GetSpecificType();
            do
            {
                question.DisplayOptions();
                Console.WriteLine();
                input = Console.ReadLine();
                if (question.CheckAnswer(input))
                {
                    break;
                }
            } while (true);

            return(question.ConsiderFactor(age, modifier, input));
        }