Beispiel #1
0
 public Deposit(Customer customer,decimal balance,decimal interest)
     : base(customer, balance, interest)
 {
     this.Customer = customer;
     this.Balance = balance;
     this.InterestRate = interest;
 }
Beispiel #2
0
 public Loan(Customer Customer,decimal Balance,decimal InterestRate)
     : base(Customer, Balance, InterestRate)
 {
     this.Customer = Customer;
     this.Balance = Balance;
     this.InterestRate = InterestRate;
 }
Beispiel #3
0
 public Mortgage(Customer customer, decimal Balance, decimal InterestRate)
     :base(customer,Balance,InterestRate)
 {
     this.Customer = customer;
     this.Balance = Balance;
     this.InterestRate = InterestRate;
 }
Beispiel #4
0
        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)
        {

        }
Beispiel #6
0
 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)
 {
 }
Beispiel #8
0
 public Account(Customer customer, decimal balance = 0, double interestRate = 0)
 {
     this.balance = balance;
     this.InterestRate = interestRate;
     this.Customer = customer;
 }
Beispiel #9
0
 protected Account(decimal balance, decimal interestRate, Customer customer)
 {
     this.Balance = balance;
     this.InterestRate = interestRate;
     this.Customer = customer;
 }
Beispiel #10
0
 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;
 }
Beispiel #12
0
 public LoanAccount(decimal balance, decimal yearInterestInPercent, Customer customer)
     : base(balance, yearInterestInPercent, customer) { }
Beispiel #13
0
 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;
 }
Beispiel #15
0
 public LoanAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
 public DepositAccount(Customer customer, decimal ballance, decimal interestRate)
     : base(customer, ballance, interestRate)
 {
     
 }
Beispiel #17
0
 public Accounts(double balance, Customer customers, double interestRate)
 {
     this.Balance = balance;
     this.Customers = customers;
     this.InterestRate = interestRate;
 }
Beispiel #18
0
 public DepositAccount(Customer customer, decimal balance = 0, double interestRate = 0)
     : base(customer, balance, interestRate)
 {
 }
Beispiel #19
0
 public Mortgage(double balance, Customer customers, double interestRate)
     : base(balance, customers, interestRate)
 {
 }
Beispiel #20
0
 public MortgageAccount(Customer customer, decimal balance = 0, double interestRate = 0)
     : base(customer, balance, interestRate)
 {
 }
Beispiel #21
0
 public Loan(double balance, Customer customers, double interestRate)
     : base(balance, customers, interestRate)
 {
 }
        public MortgageAccount(Customer customer, decimal ballance, decimal interestRate)
            : base(customer, ballance, interestRate)
        {

        }
Beispiel #23
0
 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)
        {

        }
Beispiel #26
0
 public Account(Customer customer, decimal Balance, decimal interest)
 {
     this.InterestRate = interest;
     this.Customer = customer;
     this.Balance = Balance;
 }
Beispiel #27
0
 protected Account(decimal balance, decimal yearInterestInPercent, Customer customer)
 {
     this.Balance = balance;
     this.MonthInterest = yearInterestInPercent / 12 / 100;
     this.Customer = customer;
 }