Java 石家庄铁道大学软件工程系 学生学籍管理系统 2019 版
本系统的作用是简单实现一些学生成绩管理操作:录入,修改,绩点计算,以及系统退出等。
首先建一个主函数实现界面的实现,然后建一个数据类用来定义存放数据。之后建立一个工具类,用来实现所有要进行的操作。首先实例化数据类,给他开辟一个可存放五组数据的数组空间,之后进行数据类的构造,然后调用赋值函数实现初始数据的存入,之后开始创建录入函数,尤其是录入界面的实现,每输一个数据进行一次界面的更新。然后先将录入的数据用新定义的变量来存取,之后输入完全后当输入"Y”时,将数据存放在数组中,输入“N”则返回主界面。之后修改函数先将录入完成界面进行输出,然后用switch函数实现选择修改的数据,然后每次修改一个数据后输入YN来判定,是Y的话存入,N的话返回。最后成绩绩点定义一个函数实现绩点的计算,然后输出时调用该函数进行输出。之后进行平均绩点的计算与输出,然后用if语句判断平均绩点的大小进行对应的输出。
具体实现代码如下:
//20183714 1805-2 董维学
package text;
import java.util.Scanner;
public class jiemian {
public static void main(String[] args) {
tools tool=new tools();
tool.chushi();
A:while(true)//循环输出界面,并使退出界面成为可行。
{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("**********************************************************");
Scanner scanner =new Scanner(System.in);
switch(scanner.nextInt()) {
case 1:
System.out.println("你选择了学生考试成绩录入;");
tool.luru();
break;
case 2:
System.out.println("你选择了 学生考试成绩修改;");
tool.update();
break;
case 3:
System.out.println("你选择了计算学生成绩绩点;");
tool.jidian();
break;
case 4:
System.out.println("***********************************************************");
System.out.println(" 谢谢使用石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 制作人:董维学");
System.out.println("***********************************************************");
break A;
default:
System.out.println("输入错误请重新输入");
break ;
}
}
}
}
package text;
public class ScoreInformation {
private String stunumber;
private String name;
private double mathmaticsscore;
private double englishiscore;
private double networkscore;
private double databasescore;
private double softscore;
public String getStunumber() {
return stunumber;
}
public void setStunumber(String stunumber) {
this.stunumber = stunumber;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getMathmaticsscore() {
return mathmaticsscore;
}
public void setMathmaticsscore(double mathmaticsscore) {
this.mathmaticsscore = mathmaticsscore;
}
public double getEnglishiscore() {
return englishiscore;
}
public void setEnglishiscore(double englishiscore) {
this.englishiscore = englishiscore;
}
public double getNetworkscore() {
return networkscore;
}
public void setNetworkscore(double networkscore) {
this.networkscore = networkscore;
}
public double getDatabasescore() {
return databasescore;
}
public void setDatabasescore(double databasescore) {
this.databasescore = databasescore;
}
public double getSoftscore() {
return softscore;
}
public void setSoftscore(double softscore) {
this.softscore = softscore;
}
public void fuzhi(String stunumber,String name,double mathmaticsscore,double englishiscore,double networkscore,double databasescore,double softscore)
{
this.stunumber = stunumber;
this.name = name;
this.mathmaticsscore = mathmaticsscore;
this.englishiscore = englishiscore;
this.networkscore = networkscore;
this.databasescore = databasescore;
this.softscore = softscore;
}//进行数据的赋值。
}
package text;
import java.util.Scanner;
public class tools {
ScoreInformation[] sco =new ScoreInformation[5];
Scanner scanner =new Scanner(System.in);
public void gouzao()
{
for(int i=0;i<5;i++)
sco[i]=new ScoreInformation();
}
public void chushi()//初始输入五个学生的学号姓名。
{
gouzao();
String a1,a2,a3,a4,a5;
String b1,b2,b3,b4,b5;
a1="20183714";
a2="65164651";
a3="31654313";
a4="16546131";
a5="13584135";
b1="董维学";
b2="小明";
b3="小红";
b4="小李";
b5="小刚";
sco[0].fuzhi(a1, b1, 0, 0, 0, 0, 0);
sco[1].fuzhi(a2, b2, 0, 0, 0, 0, 0);
sco[2].fuzhi(a3, b3, 0, 0, 0, 0, 0);
sco[3].fuzhi(a4, b4, 0, 0, 0, 0, 0);
sco[4].fuzhi(a5, b5, 0, 0, 0, 0, 0);
}
public void luru()//学生信息的录入
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println("***********************************************************");
System.out.println("请输入学生学号:");
System.out.println("***********************************************************");
String num=scanner.next();
for(int j=0;j<=5;j++)
{
if(j<5)
{if(num.equals(sco[j].getStunumber()))
{ System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+num);
System.out.println(" 学生姓名:"+sco[j].getName());
System.out.println(" 请输入高等数学成绩: ");
System.out.println("***********************************************************");
double g=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println(" 学生学号:"+num);
System.out.println(" 学生姓名:"+sco[j].getName());
System.out.println(" 高等数学成绩"+g);
System.out.println(" 请输入大学英语成绩: ");
System.out.println("***********************************************************");
double y=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+num);
System.out.println(" 学生姓名:"+sco[j].getName());
System.out.println(" 高等数学成绩:"+g);
System.out.println(" 大学英语成绩:"+y);
System.out.println(" 请输入计算机网络成绩: ");
System.out.println("***********************************************************");
double w=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+num);
System.out.println(" 学生姓名:"+sco[j].getName());
System.out.println(" 高等数学成绩:"+g);
System.out.println(" 大学英语成绩:"+y);
System.out.println(" 计算机网络成绩:"+w);
System.out.println(" 请输入数据库成绩: ");
System.out.println("***********************************************************");
double s=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println("***********************************************************");
System.out.println(" 学生学号;"+num);
System.out.println(" 学生姓名:"+sco[j].getName());
System.out.println(" 高等数学成绩:"+g);
System.out.println(" 大学英语成绩:"+y);
System.out.println(" 计算机网络成绩:"+w);
System.out.println(" 数据库成绩:"+s);
System.out.println(" 请输入软件工程成绩: ");
System.out.println("***********************************************************");
double r=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入界面");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+num);
System.out.println(" 学生姓名:"+sco[j].getName());
System.out.println(" 高等数学成绩:"+g);
System.out.println(" 大学英语成绩:"+y);
System.out.println(" 计算机网络成绩:"+w);
System.out.println(" 数据库成绩:"+s);
System.out.println(" 软件工程成绩:"+r);
System.out.println("该学生成绩已录入完毕,是否提交(Y/N)");
System.out.println("***********************************************************");
String x=scanner.next();
if(x.equals("Y"))
{
sco[j].fuzhi(num, sco[j].getName(), g, y, w, s, r);
System.out.println("数据存入成功");
}
else if(x.equals("N"))
{ System.out.println("数据存入取消,请重新输入。");
luru();}
}
break;
}
if(j==5)
{
System.out.println("该学号不存在");
}
}
}
public void update()
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩修改");
System.out.println("***********************************************************");
System.out.println("请输入你要修改的学生学号:");
System.out.println("**********************************************************");
String n=scanner.next();
for(int i=0;i<6;i++)
{
if(i<5)
{ if(n.equals(sco[i].getStunumber()))
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学成绩:"+sco[i].getMathmaticsscore());
System.out.println(" 2、 大学英语成绩:"+sco[i].getEnglishiscore());
System.out.println(" 3、 计算机网络成绩:"+sco[i].getNetworkscore());
System.out.println(" 4、 数据库成绩:"+sco[i].getDatabasescore());
System.out.println(" 5、 软件工程成绩:"+sco[i].getSoftscore());
System.out.println("***********************************************************");
System.out.println("请输入你要修改的成绩:");
int q=scanner.nextInt();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
switch(q){
case 1:
System.out.println("请输入修改后的高数成绩");
double g=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学成绩:"+g);
System.out.println(" 2、 大学英语成绩:"+sco[i].getEnglishiscore());
System.out.println(" 3、 计算机网络成绩:"+sco[i].getNetworkscore());
System.out.println(" 4、 数据库成绩:"+sco[i].getDatabasescore());
System.out.println(" 5、 软件工程成绩:"+sco[i].getSoftscore());
System.out.println("该学生成绩已修改完毕,是否提交(Y/N)");
System.out.println("***********************************************************");
String x=scanner.next();
if(x.equals("Y"))
{ sco[i].setMathmaticsscore(g);
break;}
else if(x.equals("N"))
update();
break;
case 2:
System.out.println("请输入修改后的大学英语成绩");
double y=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学成绩:"+sco[i].getMathmaticsscore());
System.out.println(" 2、 大学英语成绩:"+y);
System.out.println(" 3、 计算机网络成绩:"+sco[i].getNetworkscore());
System.out.println(" 4、 数据库成绩:"+sco[i].getDatabasescore());
System.out.println(" 5、 软件工程成绩:"+sco[i].getSoftscore());
System.out.println("该学生成绩已修改完毕,是否提交(Y/N)");
System.out.println("***********************************************************");
String e=scanner.next();
if(e.equals("Y"))
sco[i].setEnglishiscore(y);
else if(e.equals("N"))
update();
break;
case 3:
System.out.println("请输入修改后的计算机网络成绩");
double w=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学成绩:"+sco[i].getMathmaticsscore());
System.out.println(" 2、 大学英语成绩:"+sco[i].getEnglishiscore());
System.out.println(" 3、 计算机网络成绩:"+w);
System.out.println(" 4、 数据库成绩:"+sco[i].getDatabasescore());
System.out.println(" 5、 软件工程成绩:"+sco[i].getSoftscore());
System.out.println("该学生成绩已修改完毕,是否提交(Y/N)");
System.out.println("***********************************************************");
String t=scanner.next();
if(t.equals("Y"))
sco[i].setNetworkscore(w);
else if(t.equals("N"))
update();
break;
case 4:
System.out.println("请输入修改后的数据库成绩");
double s=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学成绩:"+sco[i].getMathmaticsscore());
System.out.println(" 2、 大学英语成绩:"+sco[i].getEnglishiscore());
System.out.println(" 3、 计算机网络成绩:"+sco[i].getNetworkscore());
System.out.println(" 4、 数据库成绩:"+s);
System.out.println(" 5、 软件工程成绩:"+sco[i].getSoftscore());
System.out.println("该学生成绩已修改完毕,是否提交(Y/N)");
System.out.println("***********************************************************");
String u=scanner.next();
if(u.equals("Y"))
sco[i].setDatabasescore(s);
else if(u.equals("N"))
update();
break;
case 5:
System.out.println("请输入修改后的软件工程成绩");
double r=scanner.nextDouble();
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学成绩:"+sco[i].getMathmaticsscore());
System.out.println(" 2、 大学英语成绩:"+sco[i].getEnglishiscore());
System.out.println(" 3、 计算机网络成绩:"+sco[i].getNetworkscore());
System.out.println(" 4、 数据库成绩:"+sco[i].getDatabasescore());
System.out.println(" 5、 软件工程成绩:"+r);
System.out.println("该学生成绩已修改完毕,是否提交(Y/N)");
System.out.println("***********************************************************");
String o=scanner.next();
if(o.equals("Y"))
sco[i].setSoftscore(r);
else if(o.equals("N"))
update();
break;
}
break;
}
if(i==5)
{ System.out.println("输入学号有误");
break;}
}
}
public double jdjs(double x)
{ double a = 0;
if(x>=90)
a= 4;
if(x>=85 &&x<=89.9)
a=3.7;
if(x>=82 &&x<=84.9)
a=3.3;
if(x>=78 &&x<=81.9)
a=3.0;
if(x>=75 &&x<=77.9)
a=2.7;
if(x>=72 &&x<=74.9)
a=2.3;
if(x>=68 &&x<=71.9)
a=2.0;
if(x>66 &&x<=67.9)
a=1.7;
if(x>64 &&x<=65.9)
a=1.5;
if(x>60 &&x<=63.9)
a=1.0;
else a=0;
return a;
}
public void jidian()
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试绩点统计");
System.out.println("***********************************************************");
System.out.println("请输入学生学号:");
System.out.println("**********************************************************");
String n=scanner.next();
for(int i=0;i<6;i++)
{
if(i<5)
{ if(n.equals(sco[i].getStunumber()))
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版");
System.out.println(" 学生考试成绩录入");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+sco[i].getStunumber());
System.out.println(" 学生姓名:"+sco[i].getName());
System.out.println(" 1、 高等数学绩点:"+jdjs(sco[i].getMathmaticsscore()));
System.out.println(" 2、 大学英语绩点:"+jdjs(sco[i].getEnglishiscore()));
System.out.println(" 3、 计算机网络绩点:"+jdjs(sco[i].getNetworkscore()));
System.out.println(" 4、 数据库绩点:"+jdjs(sco[i].getDatabasescore()));
System.out.println(" 5、 软件工程绩点:"+jdjs(sco[i].getSoftscore()));
double m=0;
m=jdjs(sco[i].getMathmaticsscore())*4+jdjs(sco[i].getEnglishiscore())*3+jdjs(sco[i].getNetworkscore())*4+jdjs(sco[i].getDatabasescore())*3+jdjs(sco[i].getSoftscore())*2;
double num=0;
num=m/16;
System.out.println(" 你的平均学分绩点为:"+String.format("%.2f", num));
if(num>=2)
System.out.println(" 你的学分绩点已达到毕业要求! ");
else
System.out.println(" 你的学分绩点不满足毕业要求! ");
System.out.println("是否返回主系统(Y/N)");
System.out.println("***********************************************************");
B:while(true)
{String o=scanner.next();
if(o.equals("Y"))
break B;
}
break;
}
if(i==5)
{System.out.println("未查到该学号!");
break;
}
}
}
}
Java 石家庄铁道大学软件工程系 学生学籍管理系统 2019 版的更多相关文章
- “石家庄铁道大学软件工程系学生学籍管理系统2019版”java小程序制作分享
首先附上完整代码: import java.util.Scanner; public class SocreInformation { public SocreInformation(){}; pub ...
- java课堂测试样卷-----简易学籍管理系统
程序设计思路:分别建立两个类:ScoreInformation类(用来定义学生的基本信息以及设置set和get函数)ScoreManagement类(用来定义实现学生考试成绩录入,考试成绩修改,绩点计 ...
- 【C】C语言大作业——学生学籍管理系统
文章目录 学生管理系统 界面 主界面 登陆界面 注册界面 管理界面 学生界面 退出界面 链接 注意 学生管理系统 学C语言时写的一个大作业,弄了一个带图形界面的,使用的是VS配合EasyX图形库进行实 ...
- [C语言练习]学生学籍管理系统
/** * @copyright 2012 Chunhui Wang * * wangchunhui@wangchunhui.cn * * 学生学籍管理系统(12.06) */ #include &l ...
- Qt实现学生学籍管理系统(文件存储)
记录 19:53 2019-07-30 在小学期学c++做完课设后萌生了把写完的课设放在博客上的想法,于是,我第一篇博客诞生了. 22:32:19 2019-07-30 下棋 16:04:56 201 ...
- C++实现控制台学生学籍管理系统
操作流程 创建文件 创建管理类 管理类负责的内容如下: 提供与用户的沟通菜单界面 实现对职工增删改查的操作 数组数据与文件的读写交互 菜单功能实现 在StudentManager.h中定义Show ...
- 基于JSP的学生考勤管理系统(MySQL版)
介绍:基于JSP的学生考勤管理系统(MySQL版)1.包含源程序,数据库脚本.代码和数据库脚本都有详细注释.2.课题设计仅供参考学习使用,可以在此基础上进行扩展完善.开发环境:Eclipse ,MyS ...
- 【C语言期末实训】学生学籍管理系统
目录: 一,设计要求 ,总体要求: ,具体功能: 二,设计框架 三,程序代码 ,声明函数和头文件 ,声明结构体 ,声明全局变量 ,主体启动函数 ,主菜单函数 ,创建学生档案函数 ,编辑学生档案函数 , ...
- c++链表实现学生成绩管理系统(简易版)
#include<iostream> using namespace std; typedef struct student{ int id;//学号 string sex; string ...
随机推荐
- PHP无法获取.env文件设置的值
EGPCS指代的是什么? 指的是可以从服务器配置和请求的信息中获取的信息,它包括了environment(环境).GET.POST.cookie.server,对应的全局数组:$_ENV.$_ ...
- 【做题笔记】洛谷P1464 Function
我先谔谔一波 /kk 我谔谔 看题第一眼:欸这不就是按题意递归嘛,,直接搞不就好了 3 min 后,重新看题 然后自己手玩了几个样例,噢,递归太多了,铁定会 T 啊...... 然后,作为一个从没写过 ...
- mysql5.7导出数据提示--secure-file-priv选项问题的解决方法
mysql可使用 into outfile 参数把表中数据导出到csv,例如可用以下命令把user表的数据导出到user.csv select * from user into outfile '/t ...
- win api + 基础乐理产生正弦波声音
暂时记录. 感觉想写个电子钢琴乐程序了,不过感觉音有点怪怪的. #include <iostream> #include <windows.h> #include <Mm ...
- Dev-Cpp/Code::Block/MinGW下使用EasyX
众所周知,EasyX是个很香的东西,但EasyX目前只支持Visual Studio,那么如果要在MinGW(Dev-Cpp和Code::Block均使用这个编译器)上使用EasyX怎么办呢? 这篇文 ...
- Java实现Word/Pdf/TXT转html
引言: 最近公司在做一个教育培训学习及在线考试的项目,本人主要从事网络课程模块,主要做课程分类,课程,课件的创建及在线学习和统计的功能,因为课件涉及到多种类型,像视频,音频,图文,外部链接及文档类型. ...
- 对象析构谈—— delete this 的使用及注意事项
this对象是必须是用 new操作符分配的(而不是用new[],也不是用placement new,也不是局部对象,也不是global对象): delete this后,不能访问该对象任何的成员变量及 ...
- Spring Boot框架 - 数据访问 - 整合Mybatis
一.新建Spring Boot项目 注意:创建的时候勾选Mybatis依赖,pom文件如下 <dependency> <groupId>org.mybatis.spring.b ...
- 概率 lightoj 1027
题意 : 在n个门前选择一扇门出去, 然后如果第i扇门的 Xi值是正的话,你会花费Xi时间后出去 , 如果Xi是负数的话你会花费-Xi时间后回到老地方,并且忘记了刚才的选择, 选择一扇门的概率是等概的 ...
- maven版axis2调用cxf服务端开发客户端(三)
一.新建一个maven项目 二.pom.xml引入axis2依赖 <dependency> <groupId>org.apache.axis2</groupId> ...