예제 #1
0
 public override string Dial(IDialable otherPhone)
 {
     if (this.Balance > 0)
     {
         return(base.Dial(otherPhone));
     }
     else
     {
         return("Please add balance");
     }
 }
예제 #2
0
 public override string Dial(IDialable otherPhone)
 {
     if ((HasService) && (Reception > 0))
     {
         return(base.Dial(otherPhone));
     }
     else
     {
         return($"You have noe service or recpetion"); //TODO tell use which is really wrong
     }
 }
예제 #3
0
 public override string Dial(IDialable otherPhone)
 {
     //Before it's able to dial need dialtone
     if (this.hasDialtone)
     {
         return(base.Dial(otherPhone));
     }
     else
     {
         return($"Sorry can't dial not don't have dial tone....");
     }
 }
예제 #4
0
 public override string Dial(IDialable otherPhone)
 {
     //Need to have a posisitve babalce to dial
     if (this.Balance > 0)
     {
         this.Balance -= 1;
         return(base.Dial(otherPhone) + $" remainf balance is { this.Balance.ToString()}");
     }
     else
     {
         return($"Please add balance.");
     }
 }
예제 #5
0
파일: Phone.cs 프로젝트: IAMColumbia/iPhone
 public virtual string Dial(IDialable otherPhone)
 {
     return($"{this.PhoneNumber} dials {otherPhone.PhoneNumber}");
 }