public void CreateThreeInstanceThenDesplay() { AbstractDisplay aDisp1 = new CharDisplay ('H'); AbstractDisplay aDisp2 = new StringDisplay ("Hello, CSharp!"); AbstractDisplay aDisp3 = new StringDisplay ("Hello, Template Method."); aDisp1.Display (); aDisp2.Display (); aDisp3.Display (); }
public void InitializeWithStringThenDisplay() { AbstractDisplay disp = new StringDisplay ("Hello World"); disp.Display (); }