2021-04-06

package com.company.xcdq;

public class Artcile {

// 名字 单价 库存 已卖数量

    public Stringname;

    public double price;

    public int amount;

    public int number;

    public void print(int index ){

System.out.println(index +"\t" +name +"\t" +price +"\t" +amount +"\t" +number);

    }

public void setArticle(String mingzi,double danjia,int kucun,int yishou){

name =mingzi;

        price = danjia;

        amount = kucun;

        number = yishou;

    }

}

你可能感兴趣的:(2021-04-06)