예제 #1
0
 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.");
     }
 }
예제 #2
0
 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.");
     }
 }
예제 #3
0
 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)
        {

        }