Beispiel #1
0
 public Account(Customer customer, DateTime accCreated, decimal balance, double interestRate)
 {
     this.Customer = customer;
     this.accountCreated = accCreated;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
 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;  
 }
 public Account(Customer owner,
                decimal interestRate,
                decimal balance)
 {
     this.Owner = owner;
     this.InterestRate = interestRate;
     this.Balance = balance;
 }
Beispiel #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;
        }
Beispiel #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;
        }
        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)
 {
 }
Beispiel #9
0
 public abstract decimal CalculateInterest(decimal interest, int months, Customer newCustomer);
Beispiel #10
0
 public DepositAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer,balance,interestRate)
 {
     this.AccountType = AccountType.Deposit;
 }
Beispiel #11
0
 public LoanAcc(Customer customer, DateTime dateCreated, decimal balance, double interestRate)
     : base(customer, dateCreated, balance, interestRate)
 {
 }
        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)
 {
 }
Beispiel #14
0
 public Account(Customer user, decimal balance, decimal interestRate)
 {
     this.Customer = user;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
Beispiel #15
0
 public MortgageAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer,balance,interestRate)
 {
     this.AccountType = AccountType.Mortgage;
 }
Beispiel #16
0
 public Account(Customer customer, decimal balance, decimal interestRate)
 {
     this.customer = customer;
     this.balance = balance;
     this.interestRate = interestRate;
 }
Beispiel #17
0
 public Account(Customer customer, decimal interestRate)
 {
     this.InterestRate = interestRate;
     this.CreatedOn = DateTime.Now;
     this.Balance = 0m;
 }
Beispiel #18
0
 public MortgageAccount(Customer customer, decimal interestRate = DEFAULT_INTEREST_RATE)
     : base(customer, interestRate)
 {
 }
 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)
        {
 
        }
 public DepositAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
 public DepositAccount(Customer owner,
                decimal interestRate,
                decimal balance)
     : base(owner, interestRate, balance)
 {
 }
Beispiel #23
0
 public LoanAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
     this.AccountType = AccountType.Loan;
 }
        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);
            }
        }
 public LoanAccount(Customer customer, decimal balance, decimal interest)
     : base(customer, balance, interest)
 {
 }
Beispiel #26
0
 // Constructor
 public Deposit(Customer customer, decimal balance, decimal rate, DateTime openDate)
     : base(customer, balance, rate, openDate)
 {
 }