|
using System;
namespace www.askbargains.com
{
namespace AdapterDesignPattern
{
public class Teacher : ICommunicator
{
public ITalkable ObjectToTalk { get; set; }
#region ICommunicator Members
//Implementing the Chatting procedures.
public void StartChatting()
{
Console.WriteLine("What's your name?");
ObjectToTalk.TellMeAboutNameInEnglish();
Console.WriteLine("How old are you?");
ObjectToTalk.TellMeAboutAgeInEnglish();
Console.WriteLine("What's your favor food");
ObjectToTalk.TellMeAboutFavorFoodInEnglish();
}
#endregion
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.