错误Map<String,Student>) in the type BusinessClass is not applicable for the arguments (Map<Stri 20
packagestudentInforMag;importjava.util.*;classJieMianClass{staticMap<String,Student>m...
package studentInforMag;
import java.util.*;
class JieMianClass {
static Map<String,Student> map=new HashMap<String,Student>();
public static void main(String[] args) {
int choice=0;
while(true)
{
printMenu();
choice=AsistClass.readInt("请选择: ");
switchMenu(choice);
if(choice==0){
if(AsistClass.readStr("是否真的退出?y/n: ").toLowerCase().equals("y"))
{
AsistClass.println("谢谢使用!\n再见! ");
break;
}
}
}
}
public static void printMenu(){
AsistClass.println("\t----学生信息系统菜单----");
AsistClass.println("\t 1.添加学生");
AsistClass.println("\t 2.显示所有学生");
AsistClass.println("\t 3.查询学生");
AsistClass.println("\t 4.修改学生");
AsistClass.println("\t 5.删除学生");
AsistClass.println("\t 0.退出");
}
public static void switchMenu(int choice){
switch(choice){
case 1:
BusinessClass.addStudent(map);
break;
case 2:
BusinessClass.showAllStudent(map);
break;
case 3:
BusinessClass.searchStudent(map);
break;
case 4:
BusinessClass.updateStudent();
break;
case 5:
BusinessClass.delStudent(map);
break;
case 0:
break;
default:
AsistClass.println("选择错误! ");
}
}
} 展开
import java.util.*;
class JieMianClass {
static Map<String,Student> map=new HashMap<String,Student>();
public static void main(String[] args) {
int choice=0;
while(true)
{
printMenu();
choice=AsistClass.readInt("请选择: ");
switchMenu(choice);
if(choice==0){
if(AsistClass.readStr("是否真的退出?y/n: ").toLowerCase().equals("y"))
{
AsistClass.println("谢谢使用!\n再见! ");
break;
}
}
}
}
public static void printMenu(){
AsistClass.println("\t----学生信息系统菜单----");
AsistClass.println("\t 1.添加学生");
AsistClass.println("\t 2.显示所有学生");
AsistClass.println("\t 3.查询学生");
AsistClass.println("\t 4.修改学生");
AsistClass.println("\t 5.删除学生");
AsistClass.println("\t 0.退出");
}
public static void switchMenu(int choice){
switch(choice){
case 1:
BusinessClass.addStudent(map);
break;
case 2:
BusinessClass.showAllStudent(map);
break;
case 3:
BusinessClass.searchStudent(map);
break;
case 4:
BusinessClass.updateStudent();
break;
case 5:
BusinessClass.delStudent(map);
break;
case 0:
break;
default:
AsistClass.println("选择错误! ");
}
}
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询