美文网首页
this.packagesfee = packagesfee;

this.packagesfee = packagesfee;

作者: 哈迪斯Java | 来源:发表于2023-06-15 22:22 被阅读0次

    public class PackagedFruit extends Fruit //创建一个PackagedFruit类继承Fruit类
    {
    private double packagesfee; //定义“精装水果的包装费”
    public double getPackagesfee() //获得“精装水果的包装费”
    {
    return packagesfee;
    }
    public void setPackagesfee(double packagesfee) //设置“精装水果的包装费”
    {
    this.packagesfee = packagesfee;
    }
    }

    相关文章

      网友评论

          本文标题:this.packagesfee = packagesfee;

          本文链接:https://www.haomeiwen.com/subject/raphddtx.html