📄 item.java
字号:
public class Item {
//条目的Id
protected String ID;
//条目的描述
protected String desc;
//条目的价格
protected double price;
//此条目中货物的数量
protected int units;
//条目构造函数
public Item(String _ID) {
ID = _ID;
}
//返回条目的字符串表示形式
public String toString() {
return ID + "\t" + units + " units x " + Util.dollar(price) + "\t";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -