package 学籍管理系统;
public class Scorelnformation
{
private String stunumber;
private String name;
private double mathematicsscore;
private double englishisore;
private double networkscore;
private double databasescore;
private double softwarescore;
public String getStunumber(){
return stunumber;}
public String getName(){
return name;}
public double getMathematicsscore(){
return mathematicsscore; }
public double getEnglishisore(){
return englishisore; }
public double getNetworkscore(){
return networkscore;}
public double getDatabasescore(){
return databasescore;}
public double getSoftwarescore(){
return softwarescore;}
public void setStunumber(String stunumber){
this.stunumber = stunumber;}
public void setName(String name){
this.name = name;}
public void setMathematicsscore(double string){
this.mathematicsscore = string;}
public void setEnglishisore(double englishisore){
this.englishisore = englishisore;}
public void setNetworkscore(double networkscore){
this.networkscore = networkscore;}
public void setDatabasescore(double databasescore){
this.databasescore = databasescore;}
public void setSoftwarescore(double softwarescore){
this.softwarescore = softwarescore;
}
public static void main(String[] args) {
}}
package 学籍管理系统;
public class cunchu {
private static final Scorelnformation[] Scorelnformation = null;
public cunchu() {
for(int i=0;i<5;i++){
Scorelnformation[i]=new Scorelnformation();
Scorelnformation[0].setName("闫彦霖");
Scorelnformation[0].setStunumber("20183604");
Scorelnformation[1].setName("闫彦");
Scorelnformation[1].setStunumber("20180000");
Scorelnformation[2].setName("闫霖");
Scorelnformation[2].setStunumber("20180001");
Scorelnformation[3].setName("彦霖");
Scorelnformation[3].setStunumber("20180002");
Scorelnformation[4].setName("霖");
Scorelnformation[4].setStunumber("20180003");
}}
public static void main(String[] args) {
// TODO 自动生成的方法存根
}
}
package 学籍管理系统;
import java.io.IOException;
import
java.util.Scanner;
public class xitong {
static Scorelnformation[] Scorelnformation=new Scorelnformation[100];
static int number=0;
static Scanner scanner=new Scanner(System.in);
public static Scanner scan = new Scanner(System.in);
static Scanner in = new Scanner(System.in);
public static void menu(String[] args){
}
static void luru(){
int f=in.nextInt();
if(f==1)
{
System.out.println("学生数量");
int l=in.nextInt();
for(int j=0;j<l;j++){
System.out.println("请输入学生学号,姓名,高数成绩,英语成绩,计算机网络成绩,数据库成绩,软件工程成绩");
Scorelnformation[number]=new Scorelnformation();
Scorelnformation[number].setStunumber(scanner.next());
Scorelnformation[number].setName(scanner.next());
Scorelnformation[number].setMathematicsscore(scanner.nextInt());
Scorelnformation[number].setEnglishisore(scanner.nextInt());
Scorelnformation[number].setNetworkscore(scanner.nextInt());
Scorelnformation[number].setDatabasescore(scanner.nextInt());
Scorelnformation[number].setSoftwarescore(scanner.nextInt());
number++;
for(int i=0;i<number;i++){
System.out.println("******************************");
System.out.println("学生学号");
System.out.println(Scorelnformation[i].getStunumber());
System.out.println("学生姓名\n");
System.out.println(Scorelnformation[i].getName());
System.out.println("高等数学成绩\n");
System.out.println(Scorelnformation[i].getMathematicsscore());
System.out.println("大学英语成绩\n");
System.out.println(Scorelnformation[i].getEnglishisore());
System.out.println("计算机网络成绩\n");
System.out.println(Scorelnformation[i].getNetworkscore());
System.out.println("数据库成绩\n");
System.out.println(Scorelnformation[i].getDatabasescore());
System.out.println("软件工程成绩\n");
System.out.println(Scorelnformation[i].getSoftwarescore());
System.out.println(" 该学生成绩已录入完毕,是否提交(1是/2否)");
System.out.println("***********************************************************");
int m=in.nextInt();
if(m==1)
{
System.out.println("******************************\n");
System.out.println("******************************\n");
System.out.println(" 石家庄铁道大学软件工程系");
System.out.println(" 学生学籍管理系统2019版");
System.out.println("******************************\n");
System.out.println(" 1.学生考试成绩录入\n");
System.out.println(" 2.学生考试成绩修改\n");
System.out.println(" 3.计算学生成绩绩点\n");
System.out.println(" 4.退出学籍管理系统\n");
System.out.println("******************************\n");
}
else{Scorelnformation[i].setMathematicsscore(0);
Scorelnformation[i].setEnglishisore(0);
Scorelnformation[i].setNetworkscore(0);
Scorelnformation[i].setDatabasescore(0);
Scorelnformation[i].setSoftwarescore(0);
}
}
}}
}
static void xiugai(){
int m=in.nextInt();
if(m==2){
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩修改界面");
System.out.println("***********************************************************");
System.out.println(" 请输入学生学号:");
System.out.println("***********************************************************");
String c=scanner.next();
for(int i=0;i<100;i++){
if(c.equals(Scorelnformation[i].getStunumber())){
System.out.println("******************************");
System.out.println("学生学号");
System.out.println(Scorelnformation[i].getStunumber());
System.out.println("学生姓名\n");
System.out.println(Scorelnformation[i].getName());
System.out.println("高等数学成绩\n");
System.out.println(Scorelnformation[i].getMathematicsscore());
System.out.println("大学英语成绩\n");
System.out.println(Scorelnformation[i].getEnglishisore());
System.out.println("计算机网络成绩\n");
System.out.println(Scorelnformation[i].getNetworkscore());
System.out.println("数据库成绩\n");
System.out.println(Scorelnformation[i].getDatabasescore());
System.out.println("软件工程成绩\n");
System.out.println(Scorelnformation[i].getSoftwarescore());
System.out.println("请输入要修改的信息:1学号,2姓名,3高数,4英语,5计算机网络,6数据库,7软件工程");
int l=in.nextInt();
if(l==1){
Scorelnformation[i].setStunumber(scanner.next());
}
if(l==2){
Scorelnformation[i].setName(scanner.next());
}
if(l==3){
Scorelnformation[i].setMathematicsscore(scanner.nextInt());
}
if(l==4){
Scorelnformation[i].setEnglishisore(scanner.nextInt());
}
if(l==5){
Scorelnformation[i].setNetworkscore(scanner.nextInt());
}
if(l==6){
Scorelnformation[i].setDatabasescore(scanner.nextInt());
}
if(l==7){
Scorelnformation[i].setSoftwarescore(scanner.nextInt());
}
System.out.println("******************************");
System.out.println("学生学号");
System.out.println(Scorelnformation[i].getStunumber());
System.out.println("学生姓名\n");
System.out.println(Scorelnformation[i].getName());
System.out.println("高等数学成绩\n");
System.out.println(Scorelnformation[i].getMathematicsscore());
System.out.println("大学英语成绩\n");
System.out.println(Scorelnformation[i].getEnglishisore());
System.out.println("计算机网络成绩\n");
System.out.println(Scorelnformation[i].getNetworkscore());
System.out.println("数据库成绩\n");
System.out.println(Scorelnformation[i].getDatabasescore());
System.out.println("软件工程成绩\n");
System.out.println(Scorelnformation[i].getSoftwarescore());
System.out.println(" 该学生成绩已录入完毕,是否提交(1是/2否)");
System.out.println("***********************************************************");
int h=in.nextInt();
if(h==1)
{
System.out.println("******************************\n");
System.out.println("******************************\n");
System.out.println(" 石家庄铁道大学软件工程系");
System.out.println(" 学生学籍管理系统2019版");
System.out.println("******************************\n");
System.out.println(" 1.学生考试成绩录入\n");
System.out.println(" 2.学生考试成绩修改\n");
System.out.println(" 3.计算学生成绩绩点\n");
System.out.println(" 4.退出学籍管理系统\n");
System.out.println("******************************\n");
}
}
else{Scorelnformation[i].setMathematicsscore(0);
Scorelnformation[i].setEnglishisore(0);
Scorelnformation[i].setNetworkscore(0);
Scorelnformation[i].setDatabasescore(0);
Scorelnformation[i].setSoftwarescore(0);
}}
}}
public static void jidian( ) throws IOException{
int m=in.nextInt();
if(m==3){
System.out.println("****&**************************\n");
System.out.println("石家庄铁道大学软件工程系学生学籍管理系统2019版\n");
System.out.println(" 学生考试成绩绩点计算界面\n");
System.out.println("*******************************\n");
System.out.println(" 请输入学生学号:");
System.out.println("***********************************************************");
String c = in.next();
for(int i=0;i<100;i++){
if(c.equals(Scorelnformation[i].getStunumber())) {
System.out.println("******************************");
System.out.println("学生学号");
System.out.println(Scorelnformation[i].getStunumber());
System.out.println("学生姓名\n");
System.out.println(Scorelnformation[i].getName());
System.out.println("高等数学成绩\n");
System.out.println(Scorelnformation[i].getMathematicsscore());
System.out.println("大学英语成绩\n");
System.out.println(Scorelnformation[i].getEnglishisore());
System.out.println("计算机网络成绩\n");
System.out.println(Scorelnformation[i].getNetworkscore());
System.out.println("数据库成绩\n");
System.out.println(Scorelnformation[i].getDatabasescore());
System.out.println("软件工程成绩\n");
System.out.println(Scorelnformation[i].getSoftwarescore());
double gaoshujidian;
if(Scorelnformation[i].getMathematicsscore()>=75)
{
if(Scorelnformation[i].getMathematicsscore()>=82)
{
if(Scorelnformation[i].getMathematicsscore()>=90)
{
gaoshujidian=4.0;
}
else
{
if(Scorelnformation[i].getMathematicsscore()>=85)
{
gaoshujidian=3.7;
}
else
{
gaoshujidian=3.3;
}
}
}
else
{
if(Scorelnformation[i].getMathematicsscore()>=78)
{
gaoshujidian=3.0;
}
else
{
gaoshujidian=2.7;
}
}
}
else
{
if(Scorelnformation[i].getMathematicsscore()>=68)
{
if(Scorelnformation[i].getMathematicsscore()>=72)
{
gaoshujidian=2.3;
}
else
{
gaoshujidian=2.0;
}
}
else
{
if(Scorelnformation[i].getMathematicsscore()>=64)
{
if(Scorelnformation[i].getMathematicsscore()>=66)
{
gaoshujidian=1.7;
}
else
{
gaoshujidian=1.5;
}
}
else
{
if(Scorelnformation[i].getMathematicsscore()>=60)
{
gaoshujidian=1.0;
}
else
{
gaoshujidian=0.0;
}}}}
double yingyujidian;
if(Scorelnformation[i].getEnglishisore()>=75)
{
if(Scorelnformation[i].getEnglishisore()>=82)
{
if(Scorelnformation[i].getEnglishisore()>=90)
{
yingyujidian=4.0;
}
else
{
if(Scorelnformation[i].getEnglishisore()>=85)
{
yingyujidian=3.7;
}
else
{
yingyujidian=3.3;
}
}
}
else
{
if(Scorelnformation[i].getEnglishisore()>=78)
{
yingyujidian=3.0;
}
else
{
yingyujidian=2.7;
}
}
}
else
{
if(Scorelnformation[i].getEnglishisore()>=68)
{
if(Scorelnformation[i].getEnglishisore()>=72)
{
yingyujidian=2.3;
}
else
{
yingyujidian=2.0;
}
}
else
{
if(Scorelnformation[i].getEnglishisore()>=64)
{
if(Scorelnformation[i].getEnglishisore()>=66)
{
yingyujidian=1.7;
}
else
{
yingyujidian=1.5;
}
}
else
{
if(Scorelnformation[i].getEnglishisore()>=60)
{
yingyujidian=1.0;
}
else
{
yingyujidian=0.0;
}
}
}}
double jsjjidian;
if(Scorelnformation[i].getNetworkscore()>=75)
{
if(Scorelnformation[i].getNetworkscore()>=82)
{
if(Scorelnformation[i].getNetworkscore()>=90)
{
jsjjidian=4.0;
}
else
{
if(Scorelnformation[i].getNetworkscore()>=85)
{
jsjjidian=3.7;
}
else
{
jsjjidian=3.3;
}
}
}
else
{
if(Scorelnformation[i].getNetworkscore()>=78)
{
jsjjidian=3.0;
}
else
{
jsjjidian=2.7;
}
}
}
else
{
if(Scorelnformation[i].getNetworkscore()>=68)
{
if(Scorelnformation[i].getNetworkscore()>=72)
{
jsjjidian=2.3;
}
else
{
jsjjidian=2.0;
}
}
else
{
if(Scorelnformation[i].getNetworkscore()>=64)
{
if(Scorelnformation[i].getNetworkscore()>=66)
{
jsjjidian=1.7;
}
else
{
jsjjidian=1.5;
}
}
else
{
if(Scorelnformation[i].getNetworkscore()>=60)
{
jsjjidian=1.0;
}
else
{
jsjjidian=0.0;
}
}}}
double sjkjidian;
if(Scorelnformation[i].getDatabasescore()>=75)
{
if(Scorelnformation[i].getDatabasescore()>=82)
{
if(Scorelnformation[i].getDatabasescore()>=90)
{
sjkjidian=4.0;
}
else
{
if(Scorelnformation[i].getDatabasescore()>=85)
{
sjkjidian=3.7;
}
else
{
sjkjidian=3.3;
}
}
}
else
{
if(Scorelnformation[i].getDatabasescore()>=78)
{
sjkjidian=3.0;
}
else
{
sjkjidian=2.7;
}
}
}
else
{
if(Scorelnformation[i].getDatabasescore()>=68)
{
if(Scorelnformation[i].getDatabasescore()>=72)
{
sjkjidian=2.3;
}
else
{
sjkjidian=2.0;
}
}
else
{
if(Scorelnformation[i].getDatabasescore()>=64)
{
if(Scorelnformation[i].getDatabasescore()>=66)
{
sjkjidian=1.7;
}
else
{
sjkjidian=1.5;
}
}
else
{
if(Scorelnformation[i].getDatabasescore()>=60)
{
sjkjidian=1.0;
}
else
{
sjkjidian=0.0;
}}
}}
double rgjd;
if(Scorelnformation[i].getSoftwarescore()>=75)
{
if(Scorelnformation[i].getSoftwarescore()>=82)
{
if(Scorelnformation[i].getSoftwarescore()>=90)
{
rgjd=4.0;
}
else
{
if(Scorelnformation[i].getSoftwarescore()>=85)
{
rgjd=3.7;
}
else
{
rgjd=3.3;
}
}
}
else
{
if(Scorelnformation[i].getSoftwarescore()>=78)
{
rgjd=3.0;
}
else
{
rgjd=2.7;
}
}
}
else
{
if(Scorelnformation[i].getSoftwarescore()>=68)
{
if(Scorelnformation[i].getSoftwarescore()>=72)
{
rgjd=2.3;
}
else
{
rgjd=2.0;
}
}
else
{
if(Scorelnformation[i].getSoftwarescore()>=64)
{
if(Scorelnformation[i].getSoftwarescore()>=66)
{
rgjd=1.7;
}
else
{
rgjd=1.5;
}
}
else
{
if(Scorelnformation[i].getSoftwarescore()>=60)
{
rgjd=1.0;
}
else
{
rgjd=0.0;
}}
}}
double v;
v=(gaoshujidian+yingyujidian+jsjjidian+sjkjidian+rgjd)/5;
System.out.println("******************************");
System.out.println("学生学号");
System.out.println(Scorelnformation[i].getStunumber());
System.out.println("学生姓名\n");
System.out.println(Scorelnformation[i].getName());
System.out.println("高等数学成绩绩点\n");
System.out.println(gaoshujidian);
System.out.println("大学英语成绩绩点\n");
System.out.println(yingyujidian);
System.out.println("计算机网络成绩绩点\n");
System.out.println(jsjjidian);
System.out.println("数据库成绩绩点\n");
System.out.println(sjkjidian);
System.out.println("软件工程成绩绩点\n");
System.out.println(rgjd);
System.out.println("你的平均成绩绩点为\n");
System.out.println(v);
if(v>=2){
System.out.println("你的学分绩点已达到毕业要求\n");
}
if(v<2){
System.out.println("你的学分绩点不满足毕业要求");
}
System.out.println(" 已录入完毕,是否提交(1是/2否)");
System.out.println("***********************************************************");
int h=in.nextInt();
if(h==1)
{
System.out.println("******************************\n");
System.out.println("******************************\n");
System.out.println(" 石家庄铁道大学软件工程系");
System.out.println(" 学生学籍管理系统2019版");
System.out.println("******************************\n");
System.out.println(" 1.学生考试成绩录入\n");
System.out.println(" 2.学生考试成绩修改\n");
System.out.println(" 3.计算学生成绩绩点\n");
System.out.println(" 4.退出学籍管理系统\n");
System.out.println("******************************\n");
}
}
}}}
public static void jieshu(){
int m=in.nextInt();
if(m==4){
System.out.println("******************************\n");
System.out.println(" 谢谢使用石家庄铁道大学软件工程系学生学籍管理系统2019版\n");
System.out.println(" 制作人:闫彦霖");
System.out.println("******************************\n");
System.exit(1);
}
}
public static void main(String[] args) throws IOException {
{
System.out.println("******************************\n");
System.out.println("******************************\n");
System.out.println(" 石家庄铁道大学软件工程系");
System.out.println(" 学生学籍管理系统2019版");
System.out.println("******************************\n");
System.out.println(" 1.学生考试成绩录入\n");
System.out.println(" 2.学生考试成绩修改\n");
System.out.println(" 3.计算学生成绩绩点\n");
System.out.println(" 4.退出学籍管理系统\n");
System.out.println("******************************\n");
int num=5;
switch(num){
case 1:
luru();
break;
case 2:
xiugai();
break;
case 3:
jidian();
break;
case 4:
jieshu();
break;
default:
break;
}
xitong.luru();
xitong.jieshu();
xitong.xiugai();
xitong.jidian();
}
}
}修改功能存在bug,有时正常有时不正常,找不出来