travelexpense.java
来自「关于汽车的购买系统,收费系统,汽车耗油系统,是早期和同学开发的JAVA程序」· Java 代码 · 共 42 行
JAVA
42 行
/*
* TravelExpense.java
*
* Created on 2007年4月18日, 下午9:37
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package homework;
/**
*
* @author Administrator
*/
public abstract class TravelExpense extends Expense {
public String destination="";
/** Creates a new instance of TravelExpense */
public TravelExpense() {
this("newyork","3000","shopping");
}
public TravelExpense(String date,String description,String destination){
super(date,description);
setDestination(destination);
}
public String getDestination() {
return destination;
}
public void setDestination(String destination) {
this.destination = destination;
}
public String toString(){
return super.toString()+"\n"+"Destination: "+this.getDestination();
}
int getRDPoints(){
return 0;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?