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

📄 coffeebrewer.java

📁 ssd3部分quiz、exercise、exam的参考答案
💻 JAVA
字号:

public class CoffeeBrewer extends Product {
	
		/*
	 * (non-javadoc)
	 */
	private String model;
	
	/*
	 * (non-javadoc)
	 */
	private String waterSupply;
	
	/*
	 * (non-javadoc)
	 */
	private int numberOfCups;
	
	public CoffeeBrewer(String initialCode, 
	        String initialDescription, 
	        double initialPrice,
	        String initialModel,
	        String initialWaterSupply,
	        int initialNumberOfCups) {
		super(initialCode, initialDescription, initialPrice);
		this.model = initialModel;
		this.waterSupply = initialWaterSupply;
		this.numberOfCups = initialNumberOfCups;
		
	}
	
	public String getModel(){
		return this.model;
	
	}
	
	public String getWaterSupply(){
		return this.waterSupply;
	
	}
	
	public int getNumberOfCups(){
		return this.numberOfCups;
	
	}
	
	public String toString() {
		return super.getCode() + "_" + super.getDescription() + "_" + 
				super.getPrice() + "_" + this.getModel() + "_" +
				this.getWaterSupply() + "_" + this.getNumberOfCups();
	
	}

}

⌨️ 快捷键说明

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