Console.WriteLine("Interest Rate is: {0}", s1.GetInterestRateObj());
Console.WriteLine("Interest Rate is: {0}", s2.GetInterestRateObj());
Console.WriteLine("Interest Rate is: {0}", SavingsAccount.GetInterestRate());
Console.ReadLine();
}
C H A P T E R 5
D E F I N I N G E N C A P S U L AT E D C L A S S T Y P E S
8849CH05.qxd 10/22/07 1:34 PM Page 156
(including asking via the static GetInterestRate() method).