Esempio n. 1
0
 public Factors format(CustomerRatings ratings)
 {
     Factors factors = new Factors();
     factors.firstFactor = (int) Math.Floor((Decimal) (ratings.rating1 / 10));
     factors.secondFactor = (int) Math.Floor((Decimal) (ratings.rating2 / 10));
     return factors;
 }
Esempio n. 2
0
 public CustomerRatings getCustomerRatings(int searchField1, String searchField2)
 {
     CustomerRatings ratings = new CustomerRatings();
     ratings.rating1 = Math.Min(100, (5 + searchField1) % 20 + searchField2.Length);
     ratings.rating2 = Math.Min(100, 13 + (searchField1 + searchField2.Length) % 50);
     return ratings;
 }