📄 upperoperation.java
字号:
public class UpperOperation extends Operation{
String order[];
String param;
String param1;
boolean control=false;//control the parameter for executing the method of execute();
public UpperOperation(){
}
public void getCommand(String s[]){
if(s.length==2){
this.order=s; //get the parameter and give it to order;
control=true;
}else{
control=false;
}
}
public String execute(){
if(control==true){
String s=null; //define the return-value
this.param=order[0];
s=param.toUpperCase();
return s;
}else{
return "参数不对!";
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -