Exemple #1
0
 public Service(int num, String desc, int pRNum, int frequency, DailyRate rate)
 {
     this.number       = num;
     this.desc         = desc;
     this.petResNumber = pRNum;
     this.frequency    = frequency;
     this.rate         = rate;
 }
Exemple #2
0
 public Service(int num, String desc, int pRNum)
 {
     this.number       = num;
     this.desc         = desc;
     this.petResNumber = pRNum;
     this.frequency    = 0;
     this.rate         = new DailyRate();
 }
Exemple #3
0
 public Service()
 {
     this.number       = 0;
     this.desc         = "";
     this.frequency    = 0;
     this.petResNumber = 0;
     this.rate         = new DailyRate();
 }
Exemple #4
0
 public override bool Equals(Object rate2)
 {
     if (rate2.GetType() == typeof(DailyRate))
     {
         DailyRate rateTest = (DailyRate)rate2;
         return((this.dogSize == rateTest.dogSize) &&
                (this.rate == rateTest.rate));
     }
     else
     {
         return(false);
     }
 }
Exemple #5
0
 public int compareTo(DailyRate rate2)
 {
     if (rate > rate2.rate)
     {
         return(1);
     }
     else if (rate < rate2.rate)
     {
         return(-1);
     }
     else
     {
         return(0);
     }
 }