public static void Main(string[] strings) { Console.WriteLine("\nPassing a BankAccount"); BankAccount ba = new BankAccount(); Test1(ba); Console.WriteLine("\nPassing a SavingsAccount"); SavingsAccount sa = new SavingsAccount(); Test1(sa); Test2(sa); Console.WriteLine("\nPassing a SpecialSaleAccount"); SpecialSaleAccount ssa = new SpecialSaleAccount(); Test1(ssa); Test2(ssa); Test3(ssa); Console.WriteLine("\nPassing a SaleSpecialCustomer"); SaleSpecialCustomer ssc = new SaleSpecialCustomer(); Test1(ssc); Test2(ssc); Test3(ssc); Test4(ssc); // wait for user to acknowledge Console.WriteLine(); Console.WriteLine("Press Enter to terminate..."); Console.Read(); }
public static void Test3(SpecialSaleAccount account) { Console.WriteLine("\tto Test(SpecialSaleAccount)"); account.Withdraw(100); }