-
大小: 2KB文件類型: .zip金幣: 2下載: 0 次發(fā)布日期: 2021-06-14
- 語言: Java
- 標(biāo)簽: Java??合工大??實(shí)驗(yàn)??
資源簡介
合工大java程序設(shè)計(jì)實(shí)驗(yàn),實(shí)現(xiàn)貨物管理機(jī)制,包含三個(gè)部分,需要建立文件存儲(chǔ)貨物信息,從文件讀入處理貨物信息

代碼片段和文件信息
package?test2;
public?class?Inventory?{
String?itemNumber;
int?quantity;
String?supplierdescription;
int?flag;
public?Inventory(String?itemNumber?int?quantity?String?supplier?String?description?int?flag)?{
super();
this.itemNumber?=?itemNumber;
this.quantity?=?quantity;
this.supplier?=?supplier;
this.description?=?description;
this.flag?=?flag;
}
@Override
public?boolean?equals(object?obj)?{
if(!(obj?instanceof?Inventory))?{
return?false;
}
Inventory?inve?=?(Inventory)obj;
return?this.itemNumber.equals(inve.itemNumber);
}
???/*?@Override
????public?String?toString()?{
???? StringBuffer?s?=?new?StringBuffer();
???? s.append(itemNumber).append(“\t“).append(quantity).append(“\t“).append(supplier).append(“\t“).append(description);
???? return?s.toString();
????
????}
????*/
}
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件?????????870??2018-10-12?22:34??code\Inventory.java
?????文件????????4590??2018-10-12?23:06??code\Test.java
?????文件????????1645??2018-10-12?21:47??code\Transaction.java
- 上一篇:json.jar包
- 下一篇:java實(shí)現(xiàn)文件復(fù)制
評(píng)論
共有 條評(píng)論