public static void DeterminePrice(int age, out AgeClassification classification, out int price)
 {
     if (age < 5)
     {
         classification = AgeClassification.child;
         price          = 0;
     }
     else if (age < 20)
     {
         classification = AgeClassification.child;
         price          = 80;
     }
     else if (age > 64)
     {
         classification = AgeClassification.senior;
         price          = 90;
     }
     else if (age > 100)
     {
         classification = AgeClassification.senior;
         price          = 0;
     }
     else
     {
         classification = AgeClassification.adult;
         price          = 120;
     }
 }
示例#2
0
 public Person(AgeClassification inClassification, int inPrice)
 {
     Classification = inClassification;
     Price          = inPrice;
 }