商品管理

package edu.xcdq.mall;



/**

*商品类,对商品属性的封装

*/

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(Stringmingzi, int kucun ,double danjia , int shouchu) {

        name = mingzi;

        amount = kucun ;

        price = danjia ;

        number = shouchu ;

    }


}

你可能感兴趣的:(商品管理)