欢迎来到天天文库
浏览记录
ID:9295084
大小:109.50 KB
页数:8页
时间:2018-04-27
《教学管理系统java源代码0》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、教学管理系统java源代码篇一:java学生管理系统源代码importjava.io.Serializable;publicclassCourseimplementsSerializable{privateStringcourseName;privateintcourseGrade;Course(){courseName=null;courseGrade=0;}publicvoidsetCourseNameValue(Stringss){this.courseName=ss;}publicvoidsetCourseGradeValue(intdd){this.courseGrad
2、e=dd;}publicStringgetCourseNameValue(){returnthis.courseName;}publicintgetCourseGradeValue(){returnthis.courseGrade;}publicbooleanequals(Objecto){if(o==null){returnfalse;}else{if(oinstanceofCourse){Courserec=(Course)o;if(this.courseName.equals(rec.getCourseNameValue())){returntrue;}}returnfal
3、se;}}}---------------------------------------------------------------------------------------------------------------importjava.io.Serializable;importjava.util.Arrays;importjava.util.LinkedList;importjava.util.List;publicclassStudentimplementsSerializable,Comparable{privateStringstudentName;p
4、rivateintstudentId;//privateintstudentCourseAmount=4;privateLinkedListcourseList;Student(){studentName=null;studentId=0;courseList=newLinkedList();}publicvoidsetStudentNameValue(Stringname){//确定学生名称this.studentName=name;}publicvoidsetStudentIdValue(intid){//确定学生学号this.studentId=id;}publicvoid
5、setStudentCourseList(LinkedListlist){//传入课程链listthis.courseList=list;//System.out.println(例:0916张磊语文98数学67}publicvoidsetCourseGrade(Objecto){//将与学科o同名的学科的成绩改为o的成绩for(inti=0;ithis.courseList.size();i++){Courseobj=newCourse();obj=(Course)this.courseList.get(i);if(obj.equals(o)){Courseres=(Cours
6、e)o;obj.setCourseGradeValue(res.getCourseGradeValue());}}}publicStringgetStudentNameValue(){//取得学生姓名returnthis.studentName;}publicintgetStudentId(){//取得学生学号returnthis.studentId;}publicLinkedListgetstudentCourseList(){//得到成绩链的首地址returnthis.courseList;}publiclonggetStudentCourseGrade(Courseo){/
7、/取得与o同名的成绩值,尚有错误longtemp=0;ListcourTemp=this.getstudentCourseList();Courseobj;//System.out.println(courTemp.indexOf(o));inti=courTemp.indexOf(o);obj=(Course)courTemp.get(i);temp=obj.getCourseGradeValue();returntemp;}publicbooleanequals(Object
此文档下载收益归作者所有