Example #1
0
 public bool CheckingCustomerBuyingStatus(Pitcher pitcher)
 {
     if (pitcher.GetSweetness() == sweetPercentage || pitcher.GetSourness() == sourPercentage)
     {
         return(true);
     }
     else if (Math.Abs(pitcher.GetSweetness() - sweetPercentage) <= 20)
     {
         return(true);
     }
     else if (Math.Abs(pitcher.GetSourness() - sourPercentage) <= 20)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #2
0
 public bool DetermineIfCustomerWillBuyAgain(Pitcher pitcher)
 {
     if (pitcher.GetSweetness() == sweetness || pitcher.GetSourness() == sourness)
     {
         Console.WriteLine("{0} says, 'I really, really like this! Perfect!'", name);
         return(true);
     }
     else if (Math.Abs(pitcher.GetSweetness() - sweetness) <= 25)
     {
         Console.WriteLine("{0} says, 'Your lemonade is just as sweet as I like it.'", name);
         return(true);
     }
     else if (Math.Abs(pitcher.GetSourness() - sourness) <= 25)
     {
         Console.WriteLine("{0} says, 'Your lemonade is just as sour as I like it.'", name);
         return(true);
     }
     else
     {
         Console.WriteLine("{0} says, 'Your lemonade is ok.'", name);
         return(false);
     }
 }