class Light {

    String name;
    float r, g, b;
    boolean on;
	
    void onLight() {
        on = true;
        System.out.println("The light is turned on.");
    }
    
    void offLight() {
        on = false;
        System.out.println("The light is turned off.");
    }	

    void onOrOff () {
        if ( on == true ) 
            System.out.println("The light is on.");
        else System.out.println("The light is off.");
    }
        
    // 名前をセットする.
    void setName(String newName) {
    	name = newName;
    }
    
    // 照明の色をセットする.
    void setColor(float red, float green, float blue) {
        r = red; g = green; b = blue;
    }

}

class DirectionalLight extends Light {
}

class LightTest0 {
    public static void main(String args[]) {
        // Lightクラスのインスタンス化
        DirectionalLight dLight = new DirectionalLight(); 
        
        dLight.setName("directionalLight0"); // 名前
        dLight.setColor(1.0f, 1.0f, 1.0f); // 白色光(単精度浮動小数点)
        
        dLight.onLight(); // 点灯
        dLight.onOrOff(); // オン・オフを尋ねる.
    
        dLight.offLight(); // 消灯
        dLight.onOrOff(); // オン・オフを尋ねる.    
    }
}        