资源简介
借鉴了网上的资源,基本自己手打,没有编译测试过,基本正确
代码片段和文件信息
import java.awt.*;
import javax.swing.*;
//0:24 2013/1/13
/**
* This class models a coffee product. It extends
* {@link Product} and adds the following information:
*
* - the origin of the coffee a
String
* - the roast of the coffee a
String
* - the flavor of the coffee a
String
* - the aroma of the coffee a
String
* - the acidity of the coffee a
String
* - the body of the product a
double
*
*
* @author author name
* @version 1.0.0
* @see Product
*/
public class Coffee extends Product {
/* Origin of the coffee. */
private String origin;
/* Roast of the coffee. */
private String roast;
/* Flavor of the coffee. */
private String flavor;
/* Aroma of the coffee. */
private String aroma;
/* Acidity of the coffee.*/
private String acidity;
/* Body of the coffee */
private String body;
/**
* Constructs a Coffee
object.
*
* @param initialCode the code of the product.
* @param initialDescription a short description of the product.
* @param initialPrice the price of the product.
* @param initialOrigin the origin of coffee.
* @param initialRoast the kind of roast of the coffee.
* @param initialFlavor the flavor of the coffee.
* @param initialAroma the aroma of the coffee.
* @param initialAcidity the acidity of the coffee.
* @param initialBody the body of the 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);
origin = initialOrigin;
roast = initialRoast;
flavor = initialFlavor;
aroma = initialAroma;
acidity = initialAcidity;
body = initialBody;
}
/**
* Returns the origin of this coffee.
*
* @return the origin of this coffee.
*/
public String getOrigin() {
return origin;
}
/**
* Returns the roast of this coffee.
*
* @return the roast of this coffee.
*/
public String getRoast() {
return roast;
}
/**
* Returns the flavor of this coffee.
*
* @return the flavor of this coffee.
*/
public String getFlavor() {
return flavor;
}
/**
* Returns the aroma of this coffee.
*
* @return the aroma of this coffee.
*/
public String getAroma() {
return aroma;
}
/**
* Returns the acidity of this coffee.
*
* @return the acidity of this coffee.
*/
public String getAcidity() {
return acidity;
}
/**
* Returns the body of this coffee.
*
* @return the body of this coffee.
*/
public String getBody() {
return body;
}
/**
* Returns the string representation of this coffee.
*
* @return the string re
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 5010 2013-01-13 00:24 ex7\Coffee.java
文件 4120 2013-01-13 00:22 ex7\CoffeeBrewer.java
文件 3690 2013-01-13 00:24 ex7\Product.java
目录 0 2013-01-13 00:20 ex7
----------- --------- ---------- ----- ----
12820 4
- 上一篇:JAVA课程设计:功能比较完善的记事本
- 下一篇:JAVA五子棋游戏简单人工智能算法
相关资源
- Netty面试专题及答案
- java面试题及答案(全)
- 《软件设计模式(Java版)》每章习题
- Java英文笔试题答案汇总
- 很全面计算机面试题及答案
- jsp程序设计课后习题答案227159
- 《Java设计模式》课后答案-刘伟.rar
- Java设计模式刘伟书本中模拟考试答案
- Java设计模式刘伟课后习题答案
- 《Java设计模式》刘伟 课后习题及模拟
- 蓝桥杯VIP习题及答案
- JAVA程序设计教程课后习题答案
- 12道java经典上机测试题含答案
- 《Java设计模式》课后习题参考答案
- 《JAVA语言程序设计》期末考试试题及
- 蓝桥杯官网试题汇总含VIP试题
- 牛客网校招面试题库附答案与解析j
- java开发校招面试题库附答案与解析
- SSD8-Ex4待办事项列表答案参考
- Java编程思想练习答案官方pdf版
- JAVA编程思想练习答案完整版
- 数据结构与算法分析_java语言描述_M
- 《JAVA程序设计教程》第二版施霞萍编
- 《Java程序设计与实训》配套资料源码
- C++程序设计语言特别版 Bjarne Stroustr
- 数据结构与算法Java描述 习题答案
- 免费高清 java数据结构和算法第二版编
- 300道HTML、CSS习题及面试题含答案
- 蓝桥杯java历年真题及答案整理(共
- 自考 Java语言程序设计一课程代码:
评论
共有 条评论