static void Main(string[] args) { CheckingAccount myChkAccount = new CheckingAccount(1000); Console.WriteLine("Initiate withdrawl of $250"); myChkAccount.Withdrawal(250); Console.WriteLine("Balance is: $ " + myChkAccount.Balance); Console.ReadLine(); Console.WriteLine("Initiate withdrawl of $850"); myChkAccount.Withdrawal(850); Console.WriteLine("Balance is: $ " + myChkAccount.Balance); Console.ReadLine(); }
static void Main(string[] args) { Account myAccount; myAccount = new CheckingAccount(1000); myAccount.Withdrawal(500); Console.WriteLine(myAccount.GetType()); myAccount = new SavingsAccount(2000, 0); myAccount.Withdrawal(1500); myAccount.Deposit(500); SavingsAccount mySav = new SavingsAccount(1000, 2); // mySav.InterestRate = 10/100; mySav.InterestRate = 10; mySav.ProcessProfit(); Console.WriteLine("Balance after processing profit" + mySav.Balance); Console.WriteLine(myAccount.Balance); Console.WriteLine(myAccount.GetType()); Console.ReadLine(); }