⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 researchexpense.java

📁 javaExpense类
💻 JAVA
字号:
/*
 * ResearchExpense.java
 *
 * Created on 2007年10月17日, 上午10:08
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

//package mypkg;

/**
 *
 * @author duerbin
 */
public class ResearchExpense extends Expense
{
    protected double cost;
    protected double tax;
    public double getCost()
    {
        return cost;
    }
    public void setCost(double cost)
    {
        this.cost=cost;
    }
    public double getTax()
    {
        return tax;
    }
    public void setTax(double tax)
    {
        this.tax=tax;
    }
    public ResearchExpense()
    {
      this("2007/01/16","beizhu",0.0,0.0);  
    }
    public ResearchExpense(String date,String description,double cost,double tax)
    {
        super(date,description);
        this.cost=cost;
        this.tax=tax;
    }
    public String toString()
    {
        return "date:"+date+"description:"+description+"cost:"+cost+"tax:"+tax;
    }
    public double getTotal()
    {
        return cost+tax;
    }
   
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -