📄 fishingnet.java
字号:
package company.equipment;
public class FishingNet extends Equipment{
private double lenght;
private double width;
private double maxWeight;
public FishingNet(String type,String brand,double lenght,double width,double maxWeight){
super(type,brand);
this.lenght = lenght;
this.width = width;
this.maxWeight = maxWeight;
}
public void setLenght(double lenght){
this.lenght = lenght;
}
public void setWidth(double width){
this.width = width;
}
public double getLength() {
return this.lenght;
}
public double getWidth() {
return this.width;
}
public String getInfo(){
String info = "\n"+"\n"+"Fishing Net"+"\n"+"Type: " + super.getType() + "\n" +
"Brand: " + super.getBrand() + "\n" +
"Lenght: " + this.lenght + "\n" +
"Width: " + this.width + "\n" +
"MaxWeight: " + this.maxWeight + "\n"; ;
return info;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -