productweight.java
来自「Internet 开发技术分章节代码和自己完成的课程设计全代码(在zuoye文件」· Java 代码 · 共 18 行
JAVA
18 行
package pWeight;
public class ProductWeight
{ String product;
double weight;
public ProductWeight()//构造方法进行初始化
{ this.product="Y8015";
this.weight=32;
}
public void setProduct (String ProductName) //用于设置属性值的方法
{ this.product = ProductName; }
public String getProduct() //用于得到属性值的方法
{ return(this.product); }
public void setWeight (double WeightValue)
{ this.weight = WeightValue; }
public double getWeight()
{ return (this.weight); }
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?