用java编写一个控制台应用程序,实现以下功能:
公共?班级?AA?{
公共?静电?作废?main(String[]?args){
扫描仪?sc?=?新的?扫描仪(system . in);
system . out . println(" Please enter:");
字符串?str?=?sc . nextline();
system . out . println(str);
字符串?s1?=?str.substring(0,str.indexOf("?));
字符串?s2?=?str.substring(str.indexOf("?)?+?1,?str . length());
int?c?=?integer . parse int(S2);
如果(c?& lt?60){
if("-a "。等于(s1)){
system . out . println(" E ");
}否则{
system . out . println(" failed ");
}
}别的?如果(c?& lt?70){
if("-a "。等于(s1)){
system . out . println(" D ");
}否则{
system . out . println(" pass ");
}
}别的?如果(c?& lt?80){
if("-a "。等于(s1)){
system . out . println(" C ");
}否则{
system . out . println(" medium ");
}
}别的?如果(c?& lt?90){
if("-a "。等于(s1)){
system . out . println(" B ");
}否则{
system . out . println(" good ");
}
}否则{
if("-a "。等于(s1)){
system . out . println(" A ");
}否则{
System.out.println("优秀");
}
}
}
}