示例#1
0
 public Account(Customer customer, DateTime accCreated, decimal balance, double interestRate)
 {
     this.Customer = customer;
     this.accountCreated = accCreated;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
示例#2
0
 public BaseAccount(decimal balance, decimal interest, Customer customer, DateTime dateCreated)
 {
     this.balance = balance;
     this.interest = interest;
     this.customerType = customer;
     this.timeCreated = dateCreated;
 }
 //Constructor
 public Account(Customer customer, decimal balance, decimal rate, DateTime openDate)
 {
     this.Client = customer;
     this.Balance = balance;
     this.InterestRate = rate;
     this.openDate = openDate;  
 }
示例#4
0
 public Account(Customer owner,
                decimal interestRate,
                decimal balance)
 {
     this.Owner = owner;
     this.InterestRate = interestRate;
     this.Balance = balance;
 }
示例#5
0
        public override decimal CalculateInterest(decimal interest, int months, Customer newCustomer)
        {
            decimal interestAmount = 0;

            if (balance < 1000 && balance > 0)
            {
                interestAmount = 0;
            }
            else
            {
                interestAmount = interest * months;
            }

            return interestAmount;
        }
示例#6
0
        public override decimal CalculateInterest(decimal interest, int months, Customer NewCustomer)
        {
            decimal interestAmount = 0;

            if (NewCustomer == new Individual() && months < 4) //individuals
            {
                interestAmount = 0;
            }

            if (NewCustomer == new Company() && months < 3) //companies
            {
                interestAmount = 0;
            }

            interestAmount = interest * months;

            return interestAmount;
        }
示例#7
0
        public override decimal CalculateInterest(decimal interest, int months, Customer NewCustomer)
        {
            decimal interestAmount = 0;

            if (NewCustomer == new Individual() && months < 6)
            {
                interestAmount = 0;
            }
            if (NewCustomer == new Company() && months < 12)
            {
                interestAmount = (interest / 2)* months;
            }
            else
            {
                interestAmount = interest * months;
            }

            return interestAmount;
        }
 public MortgageAccount(Customer customer, decimal balance, decimal interest)
     : base(customer, balance, interest)
 {
 }
示例#9
0
 public abstract decimal CalculateInterest(decimal interest, int months, Customer newCustomer);
示例#10
0
 public DepositAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer,balance,interestRate)
 {
     this.AccountType = AccountType.Deposit;
 }
示例#11
0
 public LoanAcc(Customer customer, DateTime dateCreated, decimal balance, double interestRate)
     : base(customer, dateCreated, balance, interestRate)
 {
 }
示例#12
0
        public MortgageAccount(decimal balance, decimal interest, Customer customer, DateTime dateCreated)
            : base(balance, interest, customer, dateCreated)
        {
            accType = AccountType.mortgage;

            if (this.customerType == Customer.personal)
            {
                fullPaymentStarts = DateTime.Now.AddDays(178);
            }
            else if (this.customerType == Customer.company)
            {
                fullPaymentStarts = DateTime.Now.AddDays(356);
            }
        }
 public MortgageAccount(Customer owner,
                        decimal interestRate,
                        decimal balance)
     : base(owner, interestRate, balance)
 {
 }
示例#14
0
 public Account(Customer user, decimal balance, decimal interestRate)
 {
     this.Customer = user;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
示例#15
0
 public MortgageAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer,balance,interestRate)
 {
     this.AccountType = AccountType.Mortgage;
 }
示例#16
0
 public Account(Customer customer, decimal balance, decimal interestRate)
 {
     this.customer = customer;
     this.balance = balance;
     this.interestRate = interestRate;
 }
示例#17
0
 public Account(Customer customer, decimal interestRate)
 {
     this.InterestRate = interestRate;
     this.CreatedOn = DateTime.Now;
     this.Balance = 0m;
 }
示例#18
0
 public MortgageAccount(Customer customer, decimal interestRate = DEFAULT_INTEREST_RATE)
     : base(customer, interestRate)
 {
 }
示例#19
0
 public DepositAccount(decimal balance, decimal interest, Customer customer, DateTime dateCreated)
     : base(balance, interest, customer, dateCreated)
 {
 }
        public Mortgage(Customer customer, decimal balance, decimal rate, DateTime openDate)
            : base(customer, balance, rate,openDate)
        {
 
        }
示例#21
0
 public DepositAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
 public DepositAccount(Customer owner,
                decimal interestRate,
                decimal balance)
     : base(owner, interestRate, balance)
 {
 }
示例#23
0
 public LoanAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
     this.AccountType = AccountType.Loan;
 }
示例#24
0
        public LoanAccount(decimal balance, decimal interest, Customer customer, DateTime dateCreated)
            : base(balance, interest, customer, dateCreated)
        {
            accType = AccountType.loan;

            if (this.customerType == Customer.personal)
            {
                paymentStarts = dateCreated.AddDays(90);
            }
            else if (this.customerType == Customer.company)
            {
                paymentStarts = dateCreated.AddDays(60);
            }
        }
示例#25
0
 public LoanAccount(Customer customer, decimal balance, decimal interest)
     : base(customer, balance, interest)
 {
 }
示例#26
0
 // Constructor
 public Deposit(Customer customer, decimal balance, decimal rate, DateTime openDate)
     : base(customer, balance, rate, openDate)
 {
 }