⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stereo.java

📁 深入浅出设计模式
💻 JAVA
字号:
package headfirst.command.remote;public class Stereo {	String location;	public Stereo(String location) {		this.location = location;	}	public void on() {		System.out.println(location + " stereo is on");	}	public void off() {		System.out.println(location + " stereo is off");	}	public void setCD() {		System.out.println(location + " stereo is set for CD input");	}	public void setDVD() {		System.out.println(location + " stereo is set for DVD input");	}	public void setRadio() {		System.out.println(location + " stereo is set for Radio");	}	public void setVolume(int volume) {		// code to set the volume		// valid range: 1-11 (after all 11 is better than 10, right?)		System.out.println(location + " Stereo volume set to " + volume);	}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -