public Deposit(Customer customer,decimal balance,decimal interest) : base(customer, balance, interest) { this.Customer = customer; this.Balance = balance; this.InterestRate = interest; }
public Loan(Customer Customer,decimal Balance,decimal InterestRate) : base(Customer, Balance, InterestRate) { this.Customer = Customer; this.Balance = Balance; this.InterestRate = InterestRate; }
public Mortgage(Customer customer, decimal Balance, decimal InterestRate) :base(customer,Balance,InterestRate) { this.Customer = customer; this.Balance = Balance; this.InterestRate = InterestRate; }
static void Main(string[] args) { var me = new Customer("Alex", CustomerType.Individual); var acc = new DepositAccount(me, 2000, 0.2); acc.Deposit(500); acc.Withdraw(600); Console.WriteLine("Balance: {0}", acc.Balance); Console.WriteLine("Interest: {0}", acc.CalculateInterest(15)); Console.WriteLine("========"); var loanAcc = new LoanAccount(me, 3000, 0.4); try { loanAcc.Withdraw(500); } catch (InvalidOperationException ex) { Console.WriteLine(ex.Message); } }
public MortgageAcc(Customer customer, int balance, double interestRate) : base(customer, balance, interestRate) { }
public Deposit(Customer customer,decimal balance, decimal interest) { base.Customer = customer; base.Balance = balance; base.InterestRate = balance > 1000 ? interest : 0; }
public DepositAccount(double balance, Customer customers, double interestRate) : base(balance, customers, interestRate) { }
public Account(Customer customer, decimal balance = 0, double interestRate = 0) { this.balance = balance; this.InterestRate = interestRate; this.Customer = customer; }
protected Account(decimal balance, decimal interestRate, Customer customer) { this.Balance = balance; this.InterestRate = interestRate; this.Customer = customer; }
protected Account(Customer customer, decimal ballance, decimal interestRate) { this.ballance = ballance; this.customer = customer; this.interestRate = interestRate; }
protected Account(Customer customer, double balance, int interestRate) { this.Customer = customer; this.Balance = balance; this.InterestRate = interestRate; }
public LoanAccount(decimal balance, decimal yearInterestInPercent, Customer customer) : base(balance, yearInterestInPercent, customer) { }
public DepositAccount(decimal balance, decimal interest, Customer customer) : base(balance, interest, customer) { }
public Account(Customer customer, int balance, double interestRate) { this.Customer = customer; this.Balance = balance; this.InterestRate = interestRate; }
public LoanAccount(Customer customer, decimal balance, decimal interestRate) : base(customer, balance, interestRate) { }
public DepositAccount(Customer customer, decimal ballance, decimal interestRate) : base(customer, ballance, interestRate) { }
public Accounts(double balance, Customer customers, double interestRate) { this.Balance = balance; this.Customers = customers; this.InterestRate = interestRate; }
public DepositAccount(Customer customer, decimal balance = 0, double interestRate = 0) : base(customer, balance, interestRate) { }
public Mortgage(double balance, Customer customers, double interestRate) : base(balance, customers, interestRate) { }
public MortgageAccount(Customer customer, decimal balance = 0, double interestRate = 0) : base(customer, balance, interestRate) { }
public Loan(double balance, Customer customers, double interestRate) : base(balance, customers, interestRate) { }
public MortgageAccount(Customer customer, decimal ballance, decimal interestRate) : base(customer, ballance, interestRate) { }
public Mortgage(Customer customer, decimal balance, decimal interest) { base.Customer = customer; base.Balance = balance; base.InterestRate = interest; }
public DepositAcc(Customer customer, int balance, double interestRate) : base(customer, balance, interestRate) { }
public LoanAcc(Customer customer, int balance, double interestRate) : base(customer, balance, interestRate) { }
public Account(Customer customer, decimal Balance, decimal interest) { this.InterestRate = interest; this.Customer = customer; this.Balance = Balance; }
protected Account(decimal balance, decimal yearInterestInPercent, Customer customer) { this.Balance = balance; this.MonthInterest = yearInterestInPercent / 12 / 100; this.Customer = customer; }