📄 computer.java
字号:
package AOPUsingInterface.pcImpl;
import AOPUsingInterface.PcInterf;
public class Computer implements PcInterf {
static final String DEFAULTNAME = "HP-3643TU";
static final int DEFAULTPRICE = 6000;
private String pcName = DEFAULTNAME;
private int pcPrice = DEFAULTPRICE;
public String getPcName() {
return pcName;
}
public void setPcName(String pcName) {
this.pcName = pcName;
}
public int getPcPrice() {
return pcPrice;
}
public void setPcPrice(int pcPrice) {
this.pcPrice = pcPrice;
}
public void buy(){
System.out.println("购买"+pcName+"一台,"+"人民币"+pcPrice);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -