java学生管理系统源代码内容摘要:

, true)。 PrintWriter log = new PrintWriter(fw)。 ()。 //(())。 // Student stu=(Student) o。 (删除 学生 )。 ( 学号: +()+ + 姓名 : +())。 (=====+new Date(0)+=====)。 ()。 ()。 } catch (IOException e) { ()。 } */ } else { (不存在该学生 )。 ()。 } } public void toRemoveStudent(){ (输入要删除学生的学号 )。 InputStreamReader isr = new InputStreamReader()。 BufferedReader br = new BufferedReader(isr)。 String s = null。 try { s = ()。 Scanner tempCourse=new Scanner(s)。 if(()){ int stuId = ()。 (stuId)。 } else{ (错误输入 )。 ()。 } // int stuId = ()。 // (stuId)。 } catch (IOException e) { ()。 } finally{ try { ()。 } catch (IOException e) { ()。 } } } public void changeStudent(Student o){//与 o学号或姓名一样的学生对象用 o替代 int index=0。 for(int i=0。 i()。 i++){ Student temp=(Student) (i)。 if(() == () || ().equals(())){ index=i。 break。 } } Student stu=(Student) (index)。 (index,o)。 /* String s = null。 try { FileWriter fw = new FileWriter(, true)。 PrintWriter log = new PrintWriter(fw)。 ()。 //(())。 //Student stu=(Student) o。 (修改学生信息 )。 ( 学号: +()+ + 姓名 : +())。 (=====+new Date(0)+=====)。 ()。 ()。 } catch (IOException e) { ()。 }*/ } public void toChangeStudent(){ (输入要修改的学生的学号,姓名,各科名称及成绩 以空格分开 )。 (例: 09001 朱良 语文 23 数学 45 英语 78)。 InputStreamReader isr = new InputStreamReader()。 BufferedReader br = new BufferedReader(isr)。 String s = null。 try { s = ()。 Scanner tempCourse=new Scanner(s)。 Student stu = new Student()。 int stuId = ()。 String stuName = ()。 (stuName)。 (stuId)。 LinkedList objList=new LinkedList()。 String courseName=null。 int courseGrade=0。 Course objCourse。 while(() || ()){ courseName=()。 courseGrade=()。 objCourse=new Course()。 (courseName)。 (courseGrade)。 (objCourse)。 } (objList)。 (stu)。 } catch (IOException e) { ()。 } finally{ try { ()。 } catch (IOException e) { ()。 } } } public void searchStudentById(){//查找学号为 id 的学生的信息(学号,姓名,各科成绩) (输入学号: )。 Scanner sc = new Scanner()。 int id = ()。 int index=0。 for(int i=0。 i()。 i++){ Student temp=(Student) (i。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。