예제 #1
0
 public Account(Customer customer, decimal balance, decimal interestRate)
 {
     if (balance < 0 || interestRate < 0 || interestRate > 100)
     {
         throw new ArgumentException("Invalid arguments");
     }
     this.Customer = customer;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
예제 #2
0
 protected Account(Customer customer, decimal balance, decimal interestRate)
 {
     this.customer = customer;
     if (balance > 0 && interestRate > 0)
     {
         this.balance = balance;
         this.interestRate = interestRate;
     }
     else
     {
         throw new ArgumentException("Balance and iterested rate must be bigger than 0!");
     }
 }
예제 #3
0
 public LoanAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
예제 #4
0
 public DepositAcc(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
예제 #5
0
 public Account(Customer customer, decimal balance, decimal interestRate)
 {
     this.Customer = customer;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
예제 #6
0
 public MortgageAcc(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }