public class Article {
public String name; // 商品的名称
public int amount ; // 库存
public double price; // 单价
public int number ; // 售出的数量
public void print(int index ) { // 打印 :为了便于查看商品类的详情
System.out.println(index + "\t" + name +"\t" + amount +"\t" + price +"\t" + number );
}
// 初始化商品信息
public void setArticle(String mingzi, int kucun ,double danjia , int shouchu) {
name = mingzi;
amount = kucun ;
price = danjia ;
number = shouchu ;
}
}