学生学籍管理系统
Scoremanagement.java 文件
package test1;//信1805-1 刘虎 20183652
import java.util.Scanner;
public class ScoreManagement
{
static double sj;
static double yj;
static double jj;
static double gj;
static double rj;
static double pj;
import java.util.Scanner;
public class ScoreManagement
{
static double sj;
static double yj;
static double jj;
static double gj;
static double rj;
static double pj;
int i;
public static void main(String args[])
{
zhujiemian();
}
public static void tuichujiemian() //退出界面
{
System.out.println("***************************************************************");
System.out.println(" 谢谢使用石家庄铁道大学软件工程系学生学籍管理系统 ");
System.out.println(" 制作人:刘虎 ");
System.out.println("***************************************************************");
}
public static void zhujiemian()//主界面
{
System.out.println("***************************************************************");
System.out.println(" 石家庄铁道大学软件工程系 ");
System.out.println(" 学生学籍管理系统 2019 版 ");
System.out.println("***************************************************************");
System.out.println(" 1、学生考试成绩录入 ");
System.out.println(" 2、学生考试成绩修改 ");
System.out.println(" 3、计算学生成绩绩点 ");
System.out.println(" 4、退出学籍管理系统 ");
System.out.println("***************************************************************");
ScoreInformatio stu1[]=new ScoreInformatio [5];
stu1[0].name="刘虎";
stu1[0].stunumber="20183652";
stu1[0].mathematicsscore=0.0;
stu1[0].englishiscore=0.0;
stu1[0].networkscore=0.0;
stu1[0].databasescore=0.0;
stu1[0].softwarescore=0.0;
Scanner input=new Scanner(System.in);
int j=input.nextInt();
int i;
switch(j)
{
case 1:chengjilurujiemain();
String number=input.next();
if(number==stu1[0].stunumber);
{
chengjilurujiemianer();
System.out.println(" 请输入高数成绩: ");
stu1[0].mathematicsscore=input.nextInt();
chengjilurujiemianer();
System.out.println(" 高数成绩为"+stu1[0].mathematicsscore+" ");
System.out.println(" 请输入大学英语成绩: ");
stu1[0].englishiscore=input.nextInt();
chengjilurujiemianer();
System.out.println(" 高数成绩为"+stu1[0].mathematicsscore+" ");
System.out.println(" 大学英语成绩为"+stu1[0].englishiscore+" ");
if(stu1[0].networkscore==0.0)
System.out.println(" 请输入计算机网络成绩: ");
stu1[0].networkscore=input.nextInt();
chengjilurujiemianer();
System.out.println(" 高数成绩为"+stu1[0].mathematicsscore+" ");
System.out.println(" 大学英语成绩为"+stu1[0].englishiscore+" ");
System.out.println(" 计算机网络成绩为"+stu1[0].networkscore+" ");
System.out.println(" 请输入数据结构成绩: ");
stu1[0].databasescore=input.nextInt();
chengjilurujiemianer();
System.out.println(" 高数成绩为"+stu1[0].mathematicsscore+" ");
System.out.println(" 大学英语成绩为"+stu1[0].englishiscore+" ");
System.out.println(" 计算机网络成绩为"+stu1[0].networkscore+" ");
System.out.println(" 数据结构成绩为"+stu1[0].databasescore+" ");
System.out.println(" 请输入软件工程成绩: ");
stu1[0].softwarescore=input.nextInt();
chengjilurujiemianer();
System.out.println(" 高数成绩为"+stu1[0].mathematicsscore+" ");
System.out.println(" 大学英语成绩为"+stu1[0].englishiscore+" ");
System.out.println(" 计算机网络成绩为"+stu1[0].networkscore+" ");
System.out.println(" 数据结构成绩为"+stu1[0].databasescore+" ");
System.out.println(" 软件工程成绩为"+stu1[0].softwarescore+" ");
System.out.println(" 该同学成绩录入完毕,是否提交(Y/N) ");
System.out.println("****************************************************************");
sj=jidian(stu1[0].mathematicsscore);
yj=jidian(stu1[0].englishiscore);
jj=jidian(stu1[0].networkscore);
gj=jidian(stu1[0].databasescore);
rj=jidian(stu1[0].softwarescore);
double pjj=(stu1[0].mathematicsscore*4+stu1[0].englishiscore*3+stu1[0].networkscore*4+stu1[0].databasescore*3+stu1[0].softwarescore*2)/16;
pj=jidian(pjj);
}
xuanze();
break;
case 2:xiugaichengji();
i=input.nextInt();
switch(i)
{
case 1: System.out.println(" 请输入修改后的高等数学成绩: ");
stu1[0].mathematicsscore=input.nextInt();
break;
case 2: System.out.println(" 请输入修改后的大学英语成绩: ");
stu1[0].englishiscore=input.nextInt();
break;
case 3: System.out.println(" 请输入修改后的计算机网络成绩: ");
stu1[0].networkscore=input.nextInt();
break;
case 4: System.out.println(" 请输入修改后的数据结构成绩: ");
stu1[0].databasescore=input.nextInt();
break;
case 5: System.out.println(" 请输入修改后的软件工程成绩: ");
stu1[0].softwarescore=input.nextInt();
break;
}
chengjilurujiemianer();
System.out.println(" 高数成绩为"+stu1[0].mathematicsscore+" ");
System.out.println(" 大学英语成绩为"+stu1[0].englishiscore+" ");
System.out.println(" 计算机网络成绩为"+stu1[0].networkscore+" ");
System.out.println(" 数据结构成绩为"+stu1[0].databasescore+" ");
System.out.println(" 软件工程成绩为"+stu1[0].softwarescore+" ");
System.out.println(" 该同学成绩录入完毕,是否提交(Y/N) ");
System.out.println("****************************************************************");
xuanze();
break;
case 3:
chengjijidian();
xuanze();
break;
case 4:
tuichujiemian();
break;
}
}
public static void chengjilurujiemain()//成绩录入界面
{
System.out.println("***************************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统2019版 ");
System.out.println(" 学生考试成绩录入 ");
System.out.println("***************************************************************");
System.out.println(" 请输入学生学号: ");
System.out.println("***************************************************************");
}
public static void chengjilurujiemianer()//成绩录入界面二
{
System.out.println("***************************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统2019版 ");
System.out.println(" 学生考试成绩录入 ");
System.out.println("***************************************************************");
System.out.println(" 考生学号:"+ScoreInformatio.stunumber+" ");
System.out.println(" 考生姓名:"+ScoreInformatio.name+" ");
System.out.println("****************************************************************");
}
public static void chengjijidian()//成绩绩点界面
{
System.out.println("****************************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统2019版 ");
System.out.println(" 学生考试成绩绩点计算界面 ");
System.out.println("****************************************************************");
System.out.println(" 考生学号:"+ScoreInformatio.stunumber+" ");
System.out.println(" 考生姓名:"+ScoreInformatio.name+" ");
System.out.println(" 1、高等数学成绩绩点:"+sj+" ");
System.out.println(" 2、大学英语成绩绩点:"+yj+" ");
System.out.println(" 3、计算机网络成绩绩点:"+jj+" ");
System.out.println(" 4、数据结构成绩绩点:"+gj+" ");
System.out.println(" 5、软件工程成绩绩点:"+rj+" ");
System.out.println(" 你的平均学分绩点为:"+pj+" ");
if(pj>=2)
System.out.println(" 提示信息:你的学分绩点已达到毕业要求! ");
else
System.out.println(" 提示信息:你的学分绩点不满足毕业要求! ");
System.out.println(" 是否返回系统主页面:(Y/N) ");
System.out.println("*****************************************************************");
}
public static void xiugaichengji()//修改成绩界面
{
System.out.println("*****************************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统2019版 ");
System.out.println(" 学生考试成绩录入界面 ");
System.out.println("******************************************************************");
System.out.println(" 考生学号:"+ScoreInformatio.stunumber+" ");
System.out.println(" 考生姓名:"+ScoreInformatio.name+" ");
}
public static double jidian(double n) //计算绩点界面
{
double s=0;
if(n<60)
s=0;
else if(n>=60&&n<63.5)
s=1.0;
else if(n>=64&&n<65.9)
s=1.5;
else if(n>=66&&n<67.9)
s=1.7;
else if(n>=68&&n<71.5)
s=2.0;
else if(n>=72&&n<74.5)
s=2.3;
else if(n>=75&&n<77.9)
s=2.7;
else if(n>=78&&n<81.9)
s=3.0;
else if(n>=82&&n<84.5)
s=3.3;
else if(n>=85&&n<89.9)
s=3.7;
else if(n>=90)
s=4.0;
return s;
}
public static void xuanze()
{
String c;
Scanner input=new Scanner(System.in);
c=input.next();
char x=c.charAt(0);
if(x=='Y')
zhujiemian();
else if(x=='N');
}
}
ScoreInformation.Java 文件
ScoreInformation.Java 文件
package test1;
public class ScoreInformatio {
static String stunumber;
static String name;
public static double mathematicsscore;
public static double englishiscore;
public static double networkscore;
public static double databasescore;
public static double softwarescore;
public ScoreInformatio()
{
}
public void Setstunumber(String s)//输入学号
{
stunumber=s;
}
public void Setname(String n)//输入姓名
{
name=n;
}
public void Setmathematicsscore(double m) //输入数学分数
{
mathematicsscore=m;
}
public void Setenglishiscore(double e)//输入英语分数
{
englishiscore=e;
}
public void Setnetworkscore(double n)//输入计算机网络分数
{
networkscore=n;
}
public void Setdatabasescore(double d)//输入数据结构分数
{
databasescore=d;
}
public void Setsoftwarescore(double s)//输入软件工程分数
{
softwarescore=s;
}
public void Getstunumber()//输出学号
{
System.out.println("学号为:"+stunumber);
}
public void Getname()//输出姓名
{
System.out.println("姓名为:"+name);
}
public void Getmathematicsscore()//输出高数成绩
{
System.out.println("高等数学成绩为:"+mathematicsscore);
}
public void Getenglishiscore() //输出大学英语成绩
{
System.out.println("大学英语成绩为:"+englishiscore);
}
public void Getnetworkscore() //输出计算机网络成绩
{
System.out.println("计算机网络成绩为:"+networkscore);
}
public void Getdatabasescore() //输出数据结构成绩
{
System.out.println("数据结构成绩为:"+databasescore);
}
public void Getsoftwarescore() //输出软件工程成绩
{
System.out.println("软件工程成绩为:"+softwarescore);
}
}![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221536579-1634495990.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221553461-749672772.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221611816-1092937141.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221624161-189600168.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221635243-76757169.png)
static String stunumber;
static String name;
public static double mathematicsscore;
public static double englishiscore;
public static double networkscore;
public static double databasescore;
public static double softwarescore;
public ScoreInformatio()
{
}
public void Setstunumber(String s)//输入学号
{
stunumber=s;
}
public void Setname(String n)//输入姓名
{
name=n;
}
public void Setmathematicsscore(double m) //输入数学分数
{
mathematicsscore=m;
}
public void Setenglishiscore(double e)//输入英语分数
{
englishiscore=e;
}
public void Setnetworkscore(double n)//输入计算机网络分数
{
networkscore=n;
}
public void Setdatabasescore(double d)//输入数据结构分数
{
databasescore=d;
}
public void Setsoftwarescore(double s)//输入软件工程分数
{
softwarescore=s;
}
public void Getstunumber()//输出学号
{
System.out.println("学号为:"+stunumber);
}
public void Getname()//输出姓名
{
System.out.println("姓名为:"+name);
}
public void Getmathematicsscore()//输出高数成绩
{
System.out.println("高等数学成绩为:"+mathematicsscore);
}
public void Getenglishiscore() //输出大学英语成绩
{
System.out.println("大学英语成绩为:"+englishiscore);
}
public void Getnetworkscore() //输出计算机网络成绩
{
System.out.println("计算机网络成绩为:"+networkscore);
}
public void Getdatabasescore() //输出数据结构成绩
{
System.out.println("数据结构成绩为:"+databasescore);
}
public void Getsoftwarescore() //输出软件工程成绩
{
System.out.println("软件工程成绩为:"+softwarescore);
}
}
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221536579-1634495990.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221553461-749672772.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221611816-1092937141.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221624161-189600168.png)
![](https://img2018.cnblogs.com/blog/1715959/201909/1715959-20190912221635243-76757169.png)