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

📄 coffee.java

📁 ssd3 java程序练习 exercise 3 绝对没有问题
💻 JAVA
字号:

public class Coffee extends Product {
	private String origin; //The origin of the coffee 
	private String roast; //The roast of the coffee 
	private String flavor; //The flavor of the coffee 
	private String aroma; //The aroma of the coffee 
	private String acidity; // The acidity of the coffee 
	private String body; //The body of the coffee 
	
	public Coffee (){
		
	}
	public Coffee (String initialCode,
            String initialDescription,
            double initialPrice,
            String initialOrigin,
            String initialRoast,
            String initialFlavor,
            String initialAroma,
            String initialAcidity,
            String initialBody){
	super(initialCode,initialDescription,initialPrice);
	this.origin = initialOrigin;
	this.roast = initialRoast;
	this.flavor = initialFlavor;
	this.aroma = initialAroma;
	this.acidity = initialAcidity;
	this.body = initialBody;
	}
	
	public String getOrigin(){
		return this.origin;
	}//. Returns the value of instance variable origin. 
	
	public String getRoast(){
		return this.roast;
	}//. Returns the value of instance variable roast. 
	
	public String getFlavor(){
		return this.flavor;
	}//. Returns the value of instance variable flavor. 
	
	public String getAroma(){
		return this.aroma;
	}//. Returns the value of instance variable aroma. 
	
	public String getAcidity(){
		return this.acidity;
	}//. Returns the value of instance variable acidity. 
	public String getBody(){
		return this.body;
	}//. Returns the value of instance variable body. 
	
	public String toString(){
		return super.toString()+"_"+getOrigin()+"_"+
		getRoast()+"_"+getFlavor()+"_"+
		getAroma()+"_"+getAcidity()+"_"+
		getBody();
	}


}

⌨️ 快捷键说明

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