品单价

出海帆 / 问答 / 标签

用java编写一个产品类, 1. 属性:产品编号,产品名称,产品单价,产品库存,2.构造方

package com.umessage.strategy.test;public class Product { private String p_no; private String p_name; private double p_price; private int p_num;public Product(String pNo, String pName, double pPrice, int pNum) { super(); p_no = pNo; p_name = pName; p_price = pPrice; p_num = pNum; }public Product() { super(); } public String getP_no() { return p_no; } public void setP_no(String pNo) { p_no = pNo; } public String getP_name() { return p_name; } public void setP_name(String pName) { p_name = pName; } public double getP_price() { return p_price; } public void setP_price(double pPrice) { p_price = pPrice; } public int getP_num() { return p_num; } public void setP_num(int pNum) { p_num = pNum; }}