ADD file via upload

main
pfvwqyiue 4 months ago
parent 74549f21da
commit 72801cd892

@ -0,0 +1,62 @@
package com.automobile.parts;
/**
* -
*
*/
public class SteeringWheel {
private String type;
private boolean powerAssisted;
private double diameter;
/**
* -
*/
public SteeringWheel() {
this.type = "皮质方向盘";
this.powerAssisted = true;
this.diameter = 36.0; // 厘米
}
/**
*
* @param angle
*/
public void turn(int angle) {
System.out.println("方向盘转动 " + angle + " 度");
}
/**
*
* @param height
* @param tilt
*/
public void adjustPosition(int height, int tilt) {
System.out.println("方向盘调整: 高度 " + height + "mm, 倾斜度 " + tilt + "度");
}
// Getter 和 Setter 方法
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public boolean isPowerAssisted() {
return powerAssisted;
}
public void setPowerAssisted(boolean powerAssisted) {
this.powerAssisted = powerAssisted;
}
public double getDiameter() {
return diameter;
}
public void setDiameter(double diameter) {
this.diameter = diameter;
}
}
Loading…
Cancel
Save