- 积分
- 532
- 回帖
- 0
- 西莫币
-
- 贡献
-
- 威望
-
- 存款
-
- 阅读权限
- 20
- 最后登录
- 1970-1-1
该用户从未签到
|
楼主 |
发表于 2011-11-24 20:21
|
显示全部楼层
来自: 中国江苏苏州
既然是电机,就得使用导体. 所以,首先提交 Conductor 类。
/**
* Conductor.java
* @author wenzee
* 本类定义了 Conductor
*/
public class Conductor {
// Non parameter constructor
public Conductor() {
}
// default constructor
public Conductor(String model, double conductivity, double temperatureCoefficient,
double specificHeat, double thermalConductivity) {
this.setModel(model);
this.setConductivity(conductivity);
this.setTemperatureCoefficient(temperatureCoefficient);
this.setSpecificHeat(specificHeat);
this.setThermalConductivity(thermalConductivity);
}
// constructor based on another Conductor
public Conductor(Conductor base) {
this(base.model, base.conductivity, base.temperatureCoefficient,
base.specificHeat, base.thermalConductivity );
}
/**
* @return the model
*/
public String getModel() {
return model;
}
/**
* @param model the model to set
*/
public void setModel(String model) {
this.model = model;
}
/**
* @return the conductivity
*/
public double getConductivity() {
return conductivity;
}
/**
* @param conductivity the conductivity to set
*/
public void setConductivity(double conductivity) {
this.conductivity = conductivity;
}
/**
* @return the temperatureCoefficient
*/
public double getTemperatureCoefficient() {
return temperatureCoefficient;
}
/**
* @param temperatureCoefficient the temperatureCoefficient to set
*/
public void setTemperatureCoefficient(double temperatureCoefficient) {
this.temperatureCoefficient = temperatureCoefficient;
}
/**
* @return the density
*/
public double getDensity() {
return density;
}
/**
* @param density the density to set
*/
public void setDensity(double density) {
this.density = density;
}
/**
* @return the specificHeat
*/
public double getSpecificHeat() {
return specificHeat;
}
/**
* @param specificHeat the specificHeat to set
*/
public void setSpecificHeat(double specificHeat) {
this.specificHeat = specificHeat;
}
/**
* @return the thermalConductivity
*/
public double getThermalConductivity() {
return thermalConductivity;
}
/**
* @param thermalConductivity the thermalConductivity to set
*/
public void setThermalConductivity(double thermalConductivity) {
this.thermalConductivity = thermalConductivity;
}
private String model; //导体名称,如Aluminium, Copper
private double conductivity; // 导电率, 这里没有使用 resistivity, 是便于计算
private double temperatureCoefficient; //电阻温度系数
private double density; // 密度
private double specificHeat; //比热容
private double thermalConductivity; // 热传导系数
} |
评分
-
查看全部评分
|