//信1805-2   20183670  王云鹏
package student;
import java.util.Scanner;
public class ScoreManagement {
static ScoreInformation[] A=new ScoreInformation[5];
public static void main(String args[])
{
for(int i=0;i<5;i++)
{
A[i]=new ScoreInformation();
}
A[0].set_name("张三");A[0].set_stunumber("20183333");
A[1].set_name("李四");A[1].set_stunumber("20184444");
A[2].set_name("王一");A[2].set_stunumber("20181111");
A[3].set_name("孙二");A[3].set_stunumber("20182222");
A[4].set_name("王云鹏");A[4].set_stunumber("20183670");
Scanner sca=new Scanner(System.in);
JeiMian jm=new JeiMian();
int num=4;
do
{
jm.jeimian();
num=sca.nextInt();
switch(num)
{
case 1:add();break;//录入学生成绩
case 2:alter();break;//修改学生成绩
case 3:jisuan();break;//计算成绩绩点
case 4:jm.exit();break;//退出系统
default:System.out.println("!请输入正确信息!");
} }while(num!=4);
}
private static void add()
{ boolean bool=false;
do
{
double c,d,e,f,g;
String a,b;
Scanner sca=new Scanner(System.in); JeiMian.luru1(); a=sca.next();
for(int i=0;i<5;i++)
{
b=A[i].get_stunumber();
if(a.equals(b))
{
String str;
do
{
A[i].start();
JeiMian.luru2(A[i]);
System.out.print("请输入高数成绩:");
c=sca.nextDouble();
A[i].set_mathematicsscore(c);
JeiMian.luru2(A[i]);
System.out.print("请输入大学英语成绩:");
d=sca.nextDouble();
A[i].set_englishiscore(d);
JeiMian.luru2(A[i]);
System.out.print("请输入计算机网络成绩:");
e=sca.nextDouble();
A[i].set_networkscore(e);
JeiMian.luru2(A[i]);
System.out.print("请输入数据库成绩:");
f=sca.nextDouble();
A[i].set_databasescore(f);
JeiMian.luru2(A[i]);
System.out.print("请输入软件工程成绩:");
g=sca.nextDouble();
A[i].set_softwarescore(g);
JeiMian.luru2(A[i]);
str=sca.next();
}while(str.equals("N"));
bool=true;
break;
}
}
if(bool==false)
{
System.out.println("!查无此人!");
}
}while(bool==false);
}
private static void alter()
{
boolean bool=false;
do
{
String a,b; Scanner sca=new Scanner(System.in);
JeiMian.xiugai1();
b=sca.next();
for(int i=0;i<5;i++)
{
a=A[i].get_stunumber();
if(a.equals(b))
{
String str;
do
{
int x=0;
JeiMian.xiugai2(A[i]);
x=sca.nextInt();
JeiMian.xiugai3(A[i], x);
str=sca.next();
}while(str.equals("N"));
bool=true;
break; }
}
if(bool==false)
{
System.out.println("!查无此人!");
}
}while(bool==false);
}
private static void jisuan()
{
Scanner sca=new Scanner(System.in);
boolean bool=false;
do
{
String a,b;
JeiMian.jidian1();
b=sca.next();
for(int i=0;i<5;i++)
{
a=A[i].get_stunumber();
if(a.equals(b))
{
String str;
do
{
JeiMian.jidian2(A[i]);
str=sca.next();
}while(str.equals("N"));
bool=true;
break;
}
}
if(bool==false)
{
System.out.println("!查无此人!");
}
}while(bool==false); } }
//信1805-2    20183670    王云鹏
package student; public class ScoreInformation {
private String stunumber;
private String name;
private double mathematicsscore;
private double englishiscore;
private double networkscore;
private double databasescore;
private double softwarescore;
public ScoreInformation() {
stunumber="";
name="";
mathematicsscore=-1;
englishiscore=-1;
networkscore=-1;
databasescore=-1;
softwarescore=-1;
}
ScoreInformation(String a,String b,double c,double d,double e,double f,double g)
{
stunumber=a;
name=b;
mathematicsscore=c;
englishiscore=d;
networkscore=e;
databasescore=f;
softwarescore=g;
}
public void set_stunumber(String a)
{
stunumber=a;
}
public void set_name(String b)
{
name=b;
}
public void set_mathematicsscore(double c)
{
mathematicsscore=c;
}
public void set_englishiscore(double d)
{
englishiscore=d;
}
public void set_networkscore(double e)
{
networkscore=e;
}
public void set_databasescore(double f)
{
databasescore=f;
}
public void set_softwarescore(double g)
{
softwarescore=g;
}
public String get_stunumber()
{
return stunumber;
}
public String get_name()
{
return name;
}
public double get_mathematicsscore()
{
return mathematicsscore;
}
public double get_englishiscore()
{
return englishiscore;
}
public double get_networkscore()
{
return networkscore;
}
public double get_databasescore()
{
return databasescore;
}
public double get_softwarescore()
{
return softwarescore;
}
public void start()
{
mathematicsscore=-1;
englishiscore=-1;
networkscore=-1;
databasescore=-1;
softwarescore=-1;
}
}
//信1805-2   20183670    王云鹏
package student; import java.util.Scanner; class JeiMian {
JeiMian(){} public void exit()
{
System.out.println("***********************************************************");
System.out.println(" 谢谢使用石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 制作人:王云鹏 ");
System.out.println("***********************************************************");
}
public void jeimian()
{
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("***********************************************************");
}
public static void luru1()
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩录入 ");
System.out.println("***********************************************************");
System.out.print("请输入学生学号: "); }
public static void luru2(ScoreInformation S)
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩录入界面 ");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+S.get_stunumber());
System.out.println(" 学生姓名:"+S.get_name());
if(S.get_mathematicsscore()!=-1)
{
System.out.println(" 高数成绩:"+S.get_mathematicsscore());
}
if(S.get_englishiscore()!=-1)
{
System.out.println(" 大学英语成绩:"+S.get_englishiscore());
}
if(S.get_networkscore()!=-1)
{
System.out.println(" 计算机网络成绩:"+S.get_networkscore());
}
if(S.get_databasescore()!=-1)
{
System.out.println(" 数据库成绩:"+S.get_databasescore());
}
if(S.get_softwarescore()!=-1)
{
System.out.println(" 软件工程成绩:"+S.get_softwarescore());
System.out.println(" 该学生成绩已录入完毕,是否提交(Y/N)");
System.out.println("********************************************************** ");
}
}
public static void xiugai()
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩修改界面 ");
System.out.println("***********************************************************");
} public static void xiugai1()
{
JeiMian.xiugai();
System.out.print("请输入学生学号: ");
}
public static void xiugai2(ScoreInformation S)
{
JeiMian.xiugai();
System.out.println(" 学生学号:"+S.get_stunumber());
System.out.println(" 学生姓名:"+S.get_name());
System.out.println(" 1 、高数成绩:"+S.get_mathematicsscore());
System.out.println(" 2、大学英语成绩:"+S.get_englishiscore());
System.out.println(" 3、 计算机网络成绩:"+S.get_networkscore());
System.out.println(" 4、 数据库成绩:"+S.get_databasescore());
System.out.println(" 5、 软件工程成绩:"+S.get_softwarescore());
System.out.println("***********************************************************");
System.out.print("请输入需要修改的成绩序号:");
}
public static void xiugai3(ScoreInformation S,int x) {
Scanner sca=new Scanner(System.in);
double c1;
JeiMian.xiugai();
if(x==1)
{
System.out.print("请输入修改后的高数成绩:");
c1=sca.nextDouble();
S.set_mathematicsscore(c1); }
if(x==2)
{
System.out.print("请输入修改后的大学英语成绩:");
c1=sca.nextDouble();
S.set_englishiscore(c1);
}
if(x==3)
{
System.out.print("请输入修改后的计算机网络成绩:");
c1=sca.nextDouble();
S.set_networkscore(c1);
}
if(x==4)
{
System.out.print("请输入修改后的数据库成绩:");
c1=sca.nextDouble();
S.set_databasescore(c1);
}
if(x==5)
{
System.out.print("请输入修改后的软件工程成绩:");
c1=sca.nextDouble();
S.set_softwarescore(c1);
}
JeiMian.xiugai();
System.out.println(" 学生学号:"+S.get_stunumber());
System.out.println(" 学生姓名:"+S.get_name());
System.out.println(" 1 、高数成绩:"+S.get_mathematicsscore());
System.out.println(" 2、大学英语成绩:"+S.get_englishiscore());
System.out.println(" 3、 计算机网络成绩:"+S.get_networkscore());
System.out.println(" 4、 数据库成绩:"+S.get_databasescore());
System.out.println(" 5、 软件工程成绩:"+S.get_softwarescore());
System.out.println("***********************************************************");
System.out.println(" 该学生成绩已修改完毕,是否提交(Y/N)");
System.out.println("********************************************************** ");
}
public static double jidian(double c)
{
double c1=0;
if(c>=75)
{
if(c<90)
{ if(c<82)
{
if(c<78)
{
c1=2.7;
}
else
{
c1=3;
}
}
else
{
if(c<85)
{
c1=3.3;
}
else
{
c1=3.7;
}
}
}
else
{
c1=4;
}
}
else
{
if(c<66)
{
if(c<60)
{
c1=0;
}
else
{
if(c<64)
{
c1=1;
}
else
{
c1=1.5;
}
}
}
else
{
if(c<68)
{
c1=1.7;
}
else
{
if(c<72)
{
c1=2;
}
else
{
c1=2.3;
}
}
}
}
return c1;
}
public static void jidian1()
{
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩绩点计算界面 ");
System.out.println("***********************************************************");
System.out.print(" 请输入学生学号:");
}
public static void jidian2(ScoreInformation S)
{
double c1,d1,e1,f1,g1,p;
c1=jidian(S.get_mathematicsscore());
d1=jidian(S.get_englishiscore());
e1=jidian(S.get_networkscore());
f1=jidian(S.get_databasescore());
g1=jidian(S.get_softwarescore());
p=(c1*4+d1*3+e1*4+f1*3+g1*2)/16;
System.out.println("***********************************************************");
System.out.println(" 石家庄铁道大学软件工程系学生学籍管理系统 2019 版 ");
System.out.println(" 学生考试成绩绩点计算界面 ");
System.out.println("***********************************************************");
System.out.println(" 学生学号:"+S.get_stunumber());
System.out.println(" 学生姓名:"+S.get_name());
System.out.println(" 1 、高数成绩绩点:"+c1);
System.out.println(" 2、大学英语成绩绩点:"+d1);
System.out.println(" 3、 计算机网络成绩绩点:"+e1);
System.out.println(" 4、 数据库成绩绩点:"+f1);
System.out.println(" 5、 软件工程成绩绩点:"+g1);
System.out.print(" 你的平均学分绩点为:");
System.out.printf("%.2f",p);
System.out.println();
if(p>2)
{
System.out.println(" 提示信息:你的学分绩点已达到毕业要求!");
}
else
{
System.out.println(" 提示信息:你的学分绩点不满足毕业要求!");
}
System.out.print(" 是否返回系统主界面:(Y/N)");
System.out.println("***********************************************************");
} }

通过三个类 JeiMian(定义打印给使用者看到的界面的方法)、ScoreInformation(定义有关学生姓名、学号、成绩、以及set、get方法)、ScoreManagement(主类,有逻辑的将各种方法调用实现完整的功能)。

java_学生成绩管理系统的更多相关文章

  1. Java项目:学生成绩管理系统(二)

    学生成绩管理系统(二):项目介绍 一.设计要求: 1.1 简单的图形界面登录功能. 1.2 对数据库的的信息的查询功能. 1.3 对数据库的的信息的修改功能. 1.4 对数据库的的信息的删除功能. 1 ...

  2. Java项目:学生成绩管理系统(一)

    学生成绩管理系统(一) 项目名称:学生成绩管理系统 项目需求分析(Need 需求): (1)该系统的用户分为教师和学生.教师的功能有:管理某一学生或课程的信息以及成绩,包括增.删.查.报表打印等:学生 ...

  3. 学生成绩管理系统[C]

    #include<stdio.h> #include<stdlib.h> #include<string.h> #include<conio.h> #d ...

  4. 【转】 [C/OC的那点事儿]NSMutableArray排序的三种实现(依赖学生成绩管理系统).

    原文网址:http://blog.csdn.net/ministarler/article/details/17018839 c语言实现的学生成绩管理系统是面向过程的,而OC实现的学生成绩管理系统则是 ...

  5. 学生成绩管理系统 1.0(Java+MySql)

    真难…… 数据库建立不会,中文编码不会,插入数据不会,删除不会…… Java读入数据不会……数据库连接不会…… 你也好意思说自己是学计算机的啊魂淡…… 我会慢慢写2.0,3.0版的……噗…… src/ ...

  6. 《C语言编写 学生成绩管理系统》

    /* (程序头部凝视開始) * 程序的版权和版本号声明部分 * Copyright (c) 2011, 烟台大学计算机学院学生 * All rights reserved. * 文件名: 学生成绩管理 ...

  7. c++学生成绩管理系统

    虽然比较水 =.= 但是写了两节课+一个中午 都是强迫症的锅 http://www.cnblogs.com/wenruo/p/4940182.html #include <cstdio> ...

  8. 使用C++名单在文档处理和学生成绩管理系统相结合

    对于学生成绩管理系统,我并不陌生,几乎学习C人的语言.做项目会想到学生成绩管理系统,我也不例外.在研究中的一段时间C语言之后,还用C语言到学生管理系统,然后做几个链接.计数,这个系统是以前的系统上的改 ...

  9. C语言练手自己编写学生成绩管理系统

    #include<stdio.h> #include<stdlib.h> /*定义学生结构体*/ struct Student { ]; ]; float Mark1; flo ...

随机推荐

  1. phpexcel使用说明4

    <div class="postBody"> <div id="cnblogs_post_body"><p>PHPExcel ...

  2. 利用IDEA构建springboot应用-如何优雅的使用mybatis

    orm框架的本质是简化编程中操作数据库的编码 一个是宣称可以不用写一句SQL的hibernate, 一个是可以灵活调试动态sql的mybatis mybatis-spring-boot-starter ...

  3. AcWing95. 费解的开关 枚举+位运算

    这道题的确比较难想,首先我们知道图比较小,有可能是枚举,那么该如何枚举呢??? 你可以发现,我们只要把第一排定了,并且保证第一排不准动,那么答案就定了 也就是说,我们首先用二进制枚举,枚举第一行需要翻 ...

  4. ios7.1安装提示"无法安装应用程序 由于证书无效"的解决方式二(dropbox被封项目转移到Appharbor上)

    6月18日起dropbox被天朝封了(这个真是无力吐槽),而ios7.1要求使用ssl安全连接,则须要又一次找到一个支持https的免费server. Appharbor是个不错的选择,操作简单.此外 ...

  5. 00docker安装和简介

    Docker是用于开发.装载和运行应用的开放平台.Docker项目的目标是实现轻量的操作系统级虚拟化解决方案,它提供了一种在容器中安全隔离地运行应用程序的方式.可以在宿主机上运行多个容器. Docke ...

  6. MySQL性能分析, mysql explain执行计划详解

    MySQL性能分析 MySQL性能分析及explain用法的知识是本文我们主要要介绍的内容,接下来就让我们通过一些实际的例子来介绍这一过程,希望能够对您有所帮助. 1.使用explain语句去查看分析 ...

  7. HZOJ 那一天她离我而去

    一个数据水到不行的题,各路大佬用各种方法A掉了这个题(比如A*,最短路,dfs……). 这里只说一下我的暴力和被碾压的正解. 暴力AC系列: 要找过1点的最小环,那么这个环可以拆成两部分,与1相连的两 ...

  8. hdu 1789 Doing Homework again (Greedy)

    Problem - 1789 继续贪心.经典贪心算法,如果数据比较大就要用线段树来维护了. 思路很简单,只要按照代价由大到小排序,然后靠后插入即可.RE了一次,是没想到deadline可以很大.如果d ...

  9. python yield 和 return 对比分析

    相同点:都是返回函数执行的结果 不同点:return 在返回结果后结束函数的运行,而yield 则是让函数变成一个生成器,生成器每次产生一个值(yield语句),函数被冻结,被唤醒后再产生一个值 例子 ...

  10. 微信小程序wx.request POST获取不到数据解决办法

    get //发起请求     wx.request({       url: 'http://www.xiaochengxu.com/home/index/curd', //仅为示例,并非真实的接口地 ...