GasolineEngine(); Car gasolineCar = new Car(gasolineEngine); DieselEngine dieselEngine = new DieselEngine(); Car dieselCar = new Car(dieselEngine); // Ճ HybridEngine hybridEngine = new HybridEngine(); Car hybridCar = new Car(hybridEngine); } } interface Engine { void start(); void accelerate(); } class Car { private Engine engine; public Car(Engine _engine) { this.engine = _engine; } void startEngine() { this.engine.start(); } void accelEngine() { this.engine.accelerate(); } } ͜ͷྲྀΕ͚ͩ ςετ͢Ε0,