Beispiel #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;
 }
 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!");
     }
 }
 public LoanAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
Beispiel #4
0
 public DepositAcc(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
Beispiel #5
0
 public Account(Customer customer, decimal balance, decimal interestRate)
 {
     this.Customer = customer;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
Beispiel #6
0
 public MortgageAcc(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }