passengercar.java
来自「PracticalJAVACode 的源码」· Java 代码 · 共 34 行
JAVA
34 行
class PassengerCar implements Vehicle, Asset
{
public void startEngine() {
//Code to start engine...
}
public void stopEngine() {
//Code to stop engine...
}
public void accelerate() {
//Code to accelerate...
}
public void decelerate() {
//Code to decelerate...
}
public int initialCost() {
//Return initialCost...
}
public int currentValue() {
//Calculate and return current value...
}
public double rateOfGrowth() {
//Calculate and return the growth rate of the car...
//For most cars, this will be negative.
}
public void loadPeopleInCar() {
//Code to load people in car...
}
public int adultSeating() {
return 4;
}
public int childSeating() {
return 3;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?