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