4

package LHB.inherit;

public class Electricityfees 
{
   private int lastmonth,thismonth;/*上月电表读数,本月电表读数*/
   public Electricityfees()
   {
       
   }
   public Electricityfees(int lastmonth,int thismonth)
   {
       this.lastmonth=lastmonth;
       this.thismonth=thismonth;
   }
   public int getLastmonth() 
    {
    return lastmonth;
    }

   public void setLastmonth(int lastmonth) 
    {
    this.lastmonth = lastmonth;
    }

  public int getThismonth() 
   {
    return thismonth;
   }

  public void setThismonth(int thismonth) 
   {
    this.thismonth = thismonth;
   }
   public void print()
   {
       System.out.print("上月电表读数为:"+lastmonth+"  ");
       System.out.println("这个月电表读数为:"+thismonth+"  ");
   }
}
复制代码

 

posted on 2019-06-12 15:22  胡先耀  阅读(119)  评论(0编辑  收藏  举报