コード例 #1
0
 public static void Main(string[] args)
 {
     Contractor myContractor = new BuildingContractor();
     House myHouse = myContractor.orderAhouse("Shop");
     Console.WriteLine(myHouse.ToString() + "\n");
     myHouse = myContractor.orderAhouse("Office");
     Console.WriteLine(myHouse.ToString() + "\n");
     myHouse = myContractor.orderAhouse("Resident");
     Console.WriteLine(myHouse.ToString() + "\n");
     Console.ReadLine();
 }
コード例 #2
0
        public static void Main(string[] args)
        {
            Contractor myContractor = new BuildingContractor();
            House      myHouse      = myContractor.orderAhouse("Shop");

            Console.WriteLine(myHouse.ToString() + "\n");
            myHouse = myContractor.orderAhouse("Office");
            Console.WriteLine(myHouse.ToString() + "\n");
            myHouse = myContractor.orderAhouse("Resident");
            Console.WriteLine(myHouse.ToString() + "\n");
            Console.ReadLine();
        }