Ejemplo n.º 1
0
 public Account(Customer customer, DateTime accCreated, decimal balance, double interestRate)
 {
     this.Customer = customer;
     this.accountCreated = accCreated;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
Ejemplo n.º 2
0
 public BaseAccount(decimal balance, decimal interest, Customer customer, DateTime dateCreated)
 {
     this.balance = balance;
     this.interest = interest;
     this.customerType = customer;
     this.timeCreated = dateCreated;
 }
Ejemplo n.º 3
0
 //Constructor
 public Account(Customer customer, decimal balance, decimal rate, DateTime openDate)
 {
     this.Client = customer;
     this.Balance = balance;
     this.InterestRate = rate;
     this.openDate = openDate;  
 }
Ejemplo n.º 4
0
 public Account(Customer owner,
                decimal interestRate,
                decimal balance)
 {
     this.Owner = owner;
     this.InterestRate = interestRate;
     this.Balance = balance;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 8
0
 public MortgageAccount(Customer customer, decimal balance, decimal interest)
     : base(customer, balance, interest)
 {
 }
Ejemplo n.º 9
0
 public abstract decimal CalculateInterest(decimal interest, int months, Customer newCustomer);
Ejemplo n.º 10
0
 public DepositAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer,balance,interestRate)
 {
     this.AccountType = AccountType.Deposit;
 }
Ejemplo n.º 11
0
 public LoanAcc(Customer customer, DateTime dateCreated, decimal balance, double interestRate)
     : base(customer, dateCreated, balance, interestRate)
 {
 }
Ejemplo n.º 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)
 {
 }
Ejemplo n.º 14
0
 public Account(Customer user, decimal balance, decimal interestRate)
 {
     this.Customer = user;
     this.Balance = balance;
     this.InterestRate = interestRate;
 }
Ejemplo n.º 15
0
 public MortgageAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer,balance,interestRate)
 {
     this.AccountType = AccountType.Mortgage;
 }
Ejemplo n.º 16
0
 public Account(Customer customer, decimal balance, decimal interestRate)
 {
     this.customer = customer;
     this.balance = balance;
     this.interestRate = interestRate;
 }
Ejemplo n.º 17
0
 public Account(Customer customer, decimal interestRate)
 {
     this.InterestRate = interestRate;
     this.CreatedOn = DateTime.Now;
     this.Balance = 0m;
 }
Ejemplo n.º 18
0
 public MortgageAccount(Customer customer, decimal interestRate = DEFAULT_INTEREST_RATE)
     : base(customer, interestRate)
 {
 }
Ejemplo n.º 19
0
 public DepositAccount(decimal balance, decimal interest, Customer customer, DateTime dateCreated)
     : base(balance, interest, customer, dateCreated)
 {
 }
Ejemplo n.º 20
0
        public Mortgage(Customer customer, decimal balance, decimal rate, DateTime openDate)
            : base(customer, balance, rate,openDate)
        {
 
        }
Ejemplo n.º 21
0
 public DepositAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
 }
Ejemplo n.º 22
0
 public DepositAccount(Customer owner,
                decimal interestRate,
                decimal balance)
     : base(owner, interestRate, balance)
 {
 }
Ejemplo n.º 23
0
 public LoanAccount(Customer customer, decimal balance, decimal interestRate)
     : base(customer, balance, interestRate)
 {
     this.AccountType = AccountType.Loan;
 }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 25
0
 public LoanAccount(Customer customer, decimal balance, decimal interest)
     : base(customer, balance, interest)
 {
 }
Ejemplo n.º 26
0
 // Constructor
 public Deposit(Customer customer, decimal balance, decimal rate, DateTime openDate)
     : base(customer, balance, rate, openDate)
 {
 }