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) { }
public DepositAcc(Customer customer, decimal balance, decimal interestRate) : base(customer, balance, interestRate) { }
public Account(Customer customer, decimal balance, decimal interestRate) { this.Customer = customer; this.Balance = balance; this.InterestRate = interestRate; }
public MortgageAcc(Customer customer, decimal balance, decimal interestRate) : base(customer, balance, interestRate) { }