谁能帮我看看这个程序,我用eclipise改了一下结果越改越糟。最后没办法了,请个高手帮帮忙...
//创建一个考生类,包括其属性和方法。
class Ccandidate{
public
String s_name; //考生姓名
String p_cardnumber; //准考证号
String majorname; //报考专业
String s_state; //状态(应届\历届)
int mathscore; //数学成绩
int foreignscore; //外语成绩
int majorscore; //专业课成绩
int policyscore; //政治成绩
int addscore; //总分
public Ccandidate(){
System.out.println("请输入考生的姓名、报考专业、状态(应届/历届):");
try {
s_name=String.valueOf(System.in.read());
majorname=String.valueOf(System.in.read());
s_state=String.valueOf(System.in.read());
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("请输入考生的卡号、数学、外语、专业课、政治 成绩:");
try {
p_cardnumber=String.valueOf(System.in.read());
mathscore=System.in.read();
foreignscore=System.in.read();
majorscore=System.in.read();
policyscore=System.in.read();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
addscore=mathscore+foreignscore+majorscore+policyscore;
} //无参数的构造函数
public Ccandidate(String name,String majname,String state,String number,int ms,int fs,int majs,int ps){
s_name = name;
majorname = majname;
s_state = state;
p_cardnumber=number;
mathscore=ms;
foreignscore=fs;
majorscore=majs;
policyscore=ps;
addscore=ms+fs+majs+ps;
} //获取创建时考生的成绩信息方法
}//考生类
//创建一个条件录取类,包括其属性和方法。
class Condition{
public
int math;
int foreign;
int major;
int policy ;
int totalscore;
public Condition() throws IOException{
System.out.println("请输入录取的数学,外语,专业课,政治及总分要求");
math= System.in.read();
foreign=System.in.read();
major=System.in.read();
policy=System.in.read();
totalscore=System.in.read();
}//无参的构造函数
public Condition (int mat, int foe, int mar, int pol){
math = mat;
foreign = foe;
major = mar;
policy = pol;
totalscore = mat+foe+mar+pol;
} // 获取录取分数信息的方法
} // 录取条件类
//创建一个菜单类,实现一个菜单界面的功能。
class Menu{
public Menu(){
System.out.println("\t******* 欢迎进入研究生录取系统*******");
System.out.println("\t---------------------");
System.out.println("\t\t 1.创建记录");
System.out.println("\t\t 2.成绩排名");
System.out.println("\t\t 3.录取情况");
System.out.println("\t\t 4.退出");
System.out.println("\t---------------------");
}
} //菜单类
//创建(主类)信息管理类,完成代码的实现。
public class MangerSystem{
public static void main(String[] args) throws IOException{
int a ;
Menu menu = new Menu();
Ccandidate stu[] = new Ccandidate[20];
Condition con= new Condition();
System.out.println("你的选择是:");
for(int m =1;m<=4;m++){
a = m;