static void Main() { //Just testing the objects :) Customer testCustomer = new Customer(CustomerType.Companies); List<Account> accountList = new List<Account>(); accountList.Add(new MortgagAcc(testCustomer, (decimal)5020.5, (decimal)2.2)); }
protected Account(Customer customer, decimal balance, decimal interestRate, int periodOfMonths) { this.Customer = customer; this.Balance = balance; this.InterestRate = interestRate; this.PeriodOfMonths = periodOfMonths; }
static void Main(string[] args) { Customer c = new Customer(1, "Peter Thomsen"); BankAccount acc1 = new BankAccount(1, 8, 100); CheckAccount ca1 = new CheckAccount(4, 2, 1, 5, 300); EmployeeAccount em1 = new EmployeeAccount(5,0.5,1,5,200); c.AddAccount(acc1); c.AddAccount(ca1); c.AddAccount(em1); Console.WriteLine(c.GetTotalBalance()); ca1.Withdraw(200); Console.WriteLine(c.GetTotalBalance()); em1.Withdraw(3200); Console.WriteLine(em1.Disposable); Console.WriteLine(c.GetTotalDispose()); Console.ReadLine(); }
public Mortgage(Customer customer, decimal balance, decimal interestRate, int periodOfMonths) : base(customer, balance, interestRate, periodOfMonths) { }
public Deposit(Customer customer, decimal balance, decimal interestRate, int periodOfMonths) : base(customer, balance, interestRate, periodOfMonths) { }
public MortgageAccount(Customer customer, double balance, double interestRate) { this.Customer = customer; this.Balance = balance; this.InterestRate = interestRate; }