Exemplo n.º 1
0
        public void Run()
        {
            GasolineCar008 gasolineCar = new GasolineCar008();

            gasolineCar.Color = "검정";
            gasolineCar.Size  = "SUV";
            ElectronicCar008 electronicCar = new ElectronicCar008();

            electronicCar.Color = "초록";
            electronicCar.Size  = "경차";

            Console.WriteLine("{0}색 {1}가", gasolineCar.Color, gasolineCar.Size);
            gasolineCar.Go();
            Console.WriteLine("{0}색 {1}가", electronicCar.Color, electronicCar.Size);
            electronicCar.Left();
        }
Exemplo n.º 2
0
        public void Run()
        {
            GasolineCar008 gasolineCar = new GasolineCar008();

            gasolineCar.Color = "검정";
            gasolineCar.Size  = "SUV";

            ElectronicCar008 electronicCar = new ElectronicCar008();

            electronicCar.Color = "초록";
            electronicCar.Size  = "경차";

            WriteLine($"{gasolineCar.Color}색 {gasolineCar.Size}가");
            gasolineCar.InputGas();

            WriteLine($"{electronicCar.Color}색 {electronicCar.Size}가");
            electronicCar.InputGas();
        }