public Deposit(Customer customer, decimal balance, decimal interestRate) : base(customer, balance, interestRate) { if (this.InterestRate <= 0 || this.Balance <= 0) { throw new ArgumentException("Balance and interest rate must be greater than zero."); } }
public Accounts(Customer customer, decimal balance, decimal interestRate) { this.customer = customer; if (this.balance >= 0 && this.interestRate >= 0) { this.balance = balance; this.interestRate = interestRate; } else { throw new ArgumentException("Balance and interest rate cen't be negative."); } }
public Loan(Customer customer, decimal balance, decimal interestRate) : base(customer, balance, interestRate) { }
public Deposit(Customer client, decimal balance, decimal interestRate) : base(client, balance, interestRate) { }
public Account(Customer customer, decimal balance, decimal rate) { this.Customer = customer; this.Balance = balance; this.InterestRate = rate; }
public Mortgage(Customer customer, decimal balance, decimal interestRate) : base(customer, balance, interestRate) { }