コード例 #1
0
ファイル: Program.cs プロジェクト: OswaldMobray/lab_4
        static void Main(string[] args)
        {
            Driver driver = new Driver();
            Auto   auto   = new Auto();

            driver.Travel(auto);
            Camel      camel          = new Camel();
            ITransport camelTransport = new CamelToTransportAdapter(camel);

            driver.Travel(camelTransport);

            Console.Read();
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: OswaldMobray/lab_4
 public CamelToTransportAdapter(Camel c)
 {
     camel = c;
 }