Collaboration diagram for HouseOver.THARM.CustomerCatalogue.Compares.ProfileMaxPriceComparer:

Public Member Functions | |
| ProfileMaxPriceComparer (CatalogueData data) | |
| Constructor for the ProfileMaxPriceComparer class. | |
| int | Compare (Customer x, Customer y) |
| Compare the price of the largest Profile of Customer x with the price of the largest Profile of Customer y. | |
| ProfileMaxPriceComparer (CatalogueData data) | |
| Constructor for the ProfileMaxPriceComparer class. | |
| int | Compare (Customer x, Customer y) |
| Compare the price of the largest Profile of Customer x with the price of the largest Profile of Customer y. | |
Private Attributes | |
| CatalogueData | data |
| The data catalogue to work on. | |
Definition at line 13 of file ProfileMaxPrice.cs.
| HouseOver.THARM.CustomerCatalogue.Compares.ProfileMaxPriceComparer.ProfileMaxPriceComparer | ( | CatalogueData | data | ) |
Constructor for the ProfileMaxPriceComparer class.
| data | The data catalogue to work on |
Definition at line 22 of file ProfileMaxPrice.cs.
00023 { 00024 this.data = data; 00025 }
| HouseOver.THARM.CustomerCatalogue.Compares.ProfileMaxPriceComparer.ProfileMaxPriceComparer | ( | CatalogueData | data | ) |
Constructor for the ProfileMaxPriceComparer class.
| data | The data catalogue to work on |
Definition at line 22 of file ProfileMaxPrice.cs.
00023 { 00024 this.data = data; 00025 }
| int HouseOver.THARM.CustomerCatalogue.Compares.ProfileMaxPriceComparer.Compare | ( | Customer | x, | |
| Customer | y | |||
| ) |
Compare the price of the largest Profile of Customer x with the price of the largest Profile of Customer y.
| x | The first customer | |
| y | The second customer |
Definition at line 33 of file ProfileMaxPrice.cs.
00034 { 00035 int c1 = 0; 00036 int c2 = 0; 00037 00038 foreach (Profile p in data.GetProfiles(x)) 00039 { 00040 if (p.MaxPrice > c1) c1 = p.MaxPrice; 00041 } 00042 00043 foreach (Profile p in data.GetProfiles(y)) 00044 { 00045 if (p.MaxPrice > c2) c1 = p.MaxPrice; 00046 } 00047 00048 return c1.CompareTo(c2); 00049 }
| int HouseOver.THARM.CustomerCatalogue.Compares.ProfileMaxPriceComparer.Compare | ( | Customer | x, | |
| Customer | y | |||
| ) |
Compare the price of the largest Profile of Customer x with the price of the largest Profile of Customer y.
| x | The first customer | |
| y | The second customer |
Definition at line 33 of file ProfileMaxPrice.cs.
00034 { 00035 int c1 = 0; 00036 int c2 = 0; 00037 00038 foreach (Profile p in data.GetProfiles(x)) 00039 { 00040 if (p.MaxPrice > c1) c1 = p.MaxPrice; 00041 } 00042 00043 foreach (Profile p in data.GetProfiles(y)) 00044 { 00045 if (p.MaxPrice > c2) c1 = p.MaxPrice; 00046 } 00047 00048 return c1.CompareTo(c2); 00049 }
1.5.1-p1