資源描述:
《學(xué)生信息管理系統(tǒng)java代碼》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、本學(xué)生信息管理系統(tǒng)代碼主要實(shí)現(xiàn)以下5個(gè)主功能:"1.添加一個(gè)學(xué)生");"2.根據(jù)學(xué)號(hào)/姓名查找一個(gè)學(xué)生");"3.根據(jù)學(xué)號(hào)更新一個(gè)學(xué)生信息");"4.根據(jù)學(xué)號(hào)刪除學(xué)生信息");"5.根據(jù)學(xué)號(hào)輸入學(xué)生成績(jī)");"99.退出");副功能主動(dòng)顯示計(jì)算平均分和總成績(jī)(還需添加其他功能代碼,請(qǐng)聯(lián)系)publicclassStudent{privateStringname;privateStringxuehao;privateintage;privateintindex;privateintmath;privateintc
2、hinese;privateintenglish;privateintwuli;privateinthuaxue;privateintshengwu;privateintsum;privateintavg;publicvoidsetIndex(intindex){this.index=index;}publicintgetIndex(){returnthis.index;}publicvoidsetName(Stringname){//設(shè)置名字this.name=name;}publicStringgetNam
3、e(){returnthis.name;}publicvoidsetAge(intage){this.age=age;}publicintgetAge(){returnthis.age;}publicvoidsetXuehao(Stringxuehao){//設(shè)置學(xué)號(hào)this.xuehao=xuehao;}publicStringgetXuehao(){returnthis.xuehao;}publicvoidsetMath(intmath){this.math=math;}publicintgetMath()
4、{returnthis.math;}publicvoidsetChinese(intchinese){this.chinese=chinese;}publicintgetChinese(){returnthis.chinese;}publicvoidsetEnglish(intenglish){this.english=english;}publicintgetEnglish(){returnthis.english;}publicvoidsetWuli(intwuli){this.wuli=wuli;}pub
5、licintgetWuli(){returnthis.wuli;}publicvoidsetHuaxue(inthuaxue){this.huaxue=huaxue;}publicintgetHuaxue(){returnthis.huaxue;}publicvoidsetShengwu(intshengwu){this.shengwu=shengwu;}publicintgetShengwu(){returnthis.shengwu;}publicvoidsetSum(){this.sum=this.math
6、+this.chinese+this.english+this.wuli+this.huaxue+this.shengwu;}publicintgetSum(){returnthis.sum;}publicvoidsetAvg(){this.avg=sum/6;}publicintgetAvg(){returnthis.avg;}publicStringtoString(){Stringmsg="t"+this.xuehao+"tt"+this.name+"t"+this.age+"t"+this.m
7、ath+"t"+this.chinese+"t"+this.english+"t"+this.wuli+"t"+this.huaxue+"t"+this.shengwu+"t"+this.sum+"t"+this.avg;returnmsg;}}importjava.util.Scanner;publicclassAdmin{Scannerin=newScanner(System.in);Stringmsg="t學(xué)號(hào)tt姓名t年齡t數(shù)學(xué)t語(yǔ)文t英語(yǔ)t物理t化學(xué)t生物t總成績(jī)
8、t平均分";publicvoidprint(Student[]arr){System.out.println(msg);for(inti=0;i