FeiGe快递系统——封装

public class demo03 {
private String name;
private int age;
private double high;
//getter setter
public void setName(String name){
this.name=name;
}
public String getName(){
return this.name;

}
public  void  setAge(int age){
    this.age=age;

}
public  int getAge(){
    return  this.age;
}
public  void setHigh(double high){
    this.high=high;
}
public double  getHigh(){
    return  this.high;
}

}
package wang;

/**

  • @author wangyongsheng
  • @date 2021/4/22 15:02
    */
    public class demo04 {
    private int id;
    private double price;
    private int count;
public  void  setId(int id){
    this.id=id;
}
public int getId(){
    return  this.id;
}
public void  setPrice(double price){
    this.price=price;

}
public double getPrice(){
    return  this.price;
}
public  void  setCount(int count){
    this.count=count;

}
public int getCount(){
    return this.count;
}

}

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。