精华内容
下载资源
问答
  • java编写成绩管理系统

    2014-09-12 20:50:30
    很简单的一个系统,适合初学者。使用XML作为数据库
  • 计算每人五科成绩的平均分 每科成绩平均分 优秀率
  • //studentimport java.sql.*;public class Student{private String id;private String name;private int math;private int english;private int java;private int computer;public String getId(){return id;}public...

    //student

    import java.sql.*;

    public class Student

    {

    private String id;

    private String name;

    private int math;

    private int english;

    private int java;

    private int computer;

    public String getId()

    {

    return id;

    }

    public void setId(String id)

    {

    this.id = id;

    }

    public String getName()

    {

    return name;

    }

    public void setName(String name)

    {

    this.name = name;

    }

    public int getMath()

    {

    return math;

    }

    public void setMath(int math)

    {

    this.math = math;

    }

    public int getEnglish()

    {

    return english;

    }

    public void setEnglish(int english)

    {

    this.english = english;

    }

    public int getJava()

    {

    return java;

    }

    public void setJava(int java)

    {

    this.java = java;

    }

    public int getComputer()

    {

    return computer;

    }

    public void setComputer(int computer)

    {

    this.computer = computer;

    }

    public static void main(String[] args) throws Exception

    {

    String id;

    String cid;

    String name;

    int math;

    int english;

    int java;

    int computer;

    String DBDriver = "sun.jdbc.odbc.JdbcOdbcDriver";

    String conStr = "jdbc:odbc:student";

    Connection con = null;

    Statement stmt = null;

    ResultSet rs = null;

    Class.forName(DBDriver);

    con = DriverManager.getConnection(conStr, "student", "123");

    stmt = con.createStatement();

    String s = "\n\n\t\t\t学 生 成 绩\n\n\t\t 1 新 增\n\t\t 2 更 改\n\t\t 3 删 除\n\t\t 4 查 找\n\t\t 5 显 示\n\t\t 0 退 出\n\n";

    System.out.print(s);

    int choice = Keyboard.getInteger();

    switch (choice)

    {

    // 添加学生

    case 1:

    System.out.print("请输入学生信息\n");

    System.out.print("学号:");

    id = Keyboard.getString();

    System.out.print("姓名:");

    name = Keyboard.getString();

    System.out.print("数学:");

    math = Keyboard.getInteger();

    System.out.print("英语:");

    english = Keyboard.getInteger();

    System.out.print("JAVA:");

    java = Keyboard.getInteger();

    System.out.print("计算机:");

    computer = Keyboard.getInteger();

    stmt.executeUpdate("insert into lxh1 values('" + id + "','"

    + name + "','" + math + "','" + english + "','" + java

    + "','" + computer + "')");

    System.out.println("\n添加完成。");

    break;

    // 更改成绩

    case 2:

    System.out.println("请输入要改的学生学号:");

    cid = Keyboard.getString();

    System.out.println("数学:");

    math = Keyboard.getInteger();

    System.out.println("英语:");

    english = Keyboard.getInteger();

    System.out.println("JAVA:");

    java = Keyboard.getInteger();

    System.out.println("计算机:");

    computer = Keyboard.getInteger();

    stmt.executeUpdate("update lxh1 set math='" + math + "',english='"

    + english + "',java='" + java + "',computer='" + computer

    + "' where sno=" + cid + "");

    System.out.println("\n修改完成");

    break;

    // 删除指定学生

    case 3:

    System.out.println("请输入要改的学生学号:");

    cid = Keyboard.getString();

    stmt.executeUpdate("delete from lxh1 where sno=" + cid + "");

    System.out.println("\n删除完成");

    break;

    // 显示指定学生

    case 4:

    System.out.println("请输入查找的学生学号:");

    cid = Keyboard.getString();

    System.out.println("\n" + cid

    + "号学生信息\n\n学号\t姓名\t数学\t英语\tJAVA\t计算机\t");

    rs = stmt.executeQuery("select * from lxh1 where sno=" + cid

    + "");

    while (rs.next())

    {

    System.out.println(rs.getInt("sno") + "\t"

    + rs.getString("sname") + "\t" + rs.getString("math")

    + "\t" + rs.getString("english") + "\t"

    + rs.getString("java") + "\t"

    + rs.getString("computer") + "\t");

    }

    break;

    case 5:

    // 输出全部信息

    System.out.println("\n全部学生信息\n\n学号\t姓名\t数学\t英语\tJAVA\t计算机\t平均成绩");

    rs = stmt.executeQuery("select * from lxh1 order by math desc");

    while (rs.next())

    {

    int a = rs.getInt("math");

    int b = rs.getInt("english");

    int c = rs.getInt("java");

    int d = rs.getInt("computer");

    System.out.println(rs.getString("sno") + "\t"

    + rs.getString("sname") + "\t" + a + "\t" + b + "\t"

    + c + "\t" + d + "\t" + ((a + b + c + d) / 4));

    }

    ;

    // 输出平均分

    System.out.println("\n各科平均分\n\n数学\t英语\tJAVA\t计算机\t");

    rs = stmt

    .executeQuery("select avg(math),avg(english),avg(java),avg(computer) from lxh1");

    while (rs.next())

    {

    System.out.println(rs.getInt(1) + "\t" + rs.getInt(2) + "\t"

    + rs.getInt(3) + "\t" + rs.getInt(4));

    }

    ;

    // 输出最高分

    System.out.println("\n各科最高分\n\n数学\t英语\tJAVA\t计算机\t");

    rs = stmt.executeQuery("select max(math),max(english),max(java),max(computer) from lxh1");

    while (rs.next())

    {

    System.out.println(rs.getInt(1) + "\t" + rs.getInt(2) + "\t"

    + rs.getInt(3) + "\t" + rs.getInt(4));

    }

    ;

    // 输出最低分

    System.out.println("\n各科最低分\n\n数学\t英语\tJAVA\t计算机\t");

    rs = stmt

    .executeQuery("select min(math),min(english),min(java),min(computer) from lxh1");

    while (rs.next())

    {

    System.out.println(rs.getInt(1) + "\t" + rs.getInt(2) + "\t"

    + rs.getInt(3) + "\t" + rs.getInt(4));

    }

    ;

    break;

    case 0:

    break;

    default:

    System.out.println("感谢您的使用,再见!");

    }

    ;

    stmt.close();

    con.close();

    }

    }

    展开全文
  • package ...import java.util.Scanner;public class ScoreManagement {static scoreinformation s[] = new scoreinformation[100];static int sum = 5;static Scanner shuru = new Scanner(...

    package xueshengxuejiguanlixitong;

    import java.util.Scanner;

    public class ScoreManagement {

    static scoreinformation s[] = new  scoreinformation[100];

    static int sum = 5;

    static Scanner shuru = new Scanner(System.in);

    public static void coninformation()

    {

    s[0] = new scoreinformation();

    s[0].setstunumber("20183737");

    s[0].setname("杨青");

    s[0].setmathematicsscore(0);

    s[0].setenglishscore(0);

    s[0].setnetworkscore(0);

    s[0].setdatabasescore(0);

    s[0].setsoftwarescore(0);

    s[1] = new scoreinformation();

    s[1].setstunumber("20183738");

    s[1].setname("张三");

    s[1].setmathematicsscore(0);

    s[1].setenglishscore(0);

    s[1].setnetworkscore(0);

    s[1].setdatabasescore(0);

    s[1].setsoftwarescore(0);

    s[2] = new scoreinformation();

    s[2].setstunumber("20183739");

    s[2].setname("李四");

    s[2].setmathematicsscore(0);

    s[2].setenglishscore(0);

    s[2].setnetworkscore(0);

    s[2].setdatabasescore(0);

    s[2].setsoftwarescore(0);

    s[3] = new scoreinformation();

    s[3].setstunumber("20183740");

    s[3].setname("王五");

    s[3].setmathematicsscore(0);

    s[3].setenglishscore(0);

    s[3].setnetworkscore(0);

    s[3].setdatabasescore(0);

    s[3].setsoftwarescore(0);

    s[4] = new scoreinformation();

    s[4].setstunumber("20183741");

    s[4].setname("李六");

    s[4].setmathematicsscore(0);

    s[4].setenglishscore(0);

    s[4].setnetworkscore(0);

    s[4].setdatabasescore(0);

    s[4].setsoftwarescore(0);

    }

    public static  void addscore()

    {

    while (true)

    {

    int t=0;

    System.out.println("*****************************************************");

    System.out.println("        石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("               学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("               请输入学生学号:********");

    System.out.println("****************************************************");

    System.out.println("请输入八位的学号:");

    String a=shuru.next();

    for(int i=0;i

    {

    if(a.equals(s[i].getstunumber()))

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 请输入高等数学成绩:");

    System.out.println("****************************************************");

    s[i].setmathematicsscore(shuru.nextDouble());

    if(s[i].getmathematicsscore()>0&&s[i].getmathematicsscore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 请输入大学英语成绩:");

    System.out.println("****************************************************");

    s[i].setenglishscore(shuru.nextDouble());

    if(s[i].getenglishscore()>0&&s[i].getenglishscore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 请输入计算机网络成绩:");

    System.out.println("****************************************************");

    s[i].setnetworkscore(shuru.nextDouble());

    if(s[i].getnetworkscore()>0&&s[i].getnetworkscore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 请输入数据库成绩:");

    System.out.println("****************************************************");

    s[i].setdatabasescore(shuru.nextDouble());

    if(s[i].getdatabasescore()>0&&s[i].getdatabasescore()<100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 输入数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 请输入软件工程成绩:");

    System.out.println("****************************************************");

    s[i].setsoftwarescore(shuru.nextDouble());

    if(s[i].getsoftwarescore()>0&&s[i].getsoftwarescore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    System.out.println("       该学生成绩已录入完毕,是否提交(Y/N)");

    String c=shuru.next();

    if(c.equals("Y"))

    {

    t=1;

    break;

    }

    else {

    s[i].setmathematicsscore(0);

    s[i].setenglishscore(0);

    s[i].setnetworkscore(0);

    s[i].setdatabasescore(0);

    s[i].setsoftwarescore(0);

    break;}

    }

    else {t=0;break;}

    }

    else {t=0;break;}

    }

    else {t=0;break;}

    }

    else {t=0;break;}

    }

    else if(i==sum)

    {

    t=0;

    break;

    }

    }

    }

    if(t==1)break;

    }

    }

    public static void xiugaiscore()

    {

    int m = 0;

    while (true)

    {

    System.out.println("*****************************************************");

    System.out.println("        石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("               学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("               请输入学生学号:********");

    System.out.println("****************************************************");

    System.out.println("请输入八位的学号:");

    String a=shuru.next();

    for(int i=0;i

    {

    if(a.equals(s[i].getstunumber()))

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩修改界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    double x1,x2,x3,x4,x5;

    x1 = s[i].getmathematicsscore();

    x2 = s[i].getenglishscore();

    x3 = s[i].getnetworkscore();

    x4 = s[i].getdatabasescore();

    x5 = s[i].getsoftwarescore();

    m = shuru.nextInt();

    switch(m){

    case 1:System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 请输入修改后的高等数学成绩:XXX               ");

    s[i].setmathematicsscore(shuru.nextDouble());

    if(s[i].getmathematicsscore()>0&&s[i].getmathematicsscore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");

    String c=shuru.next();

    if(c.equals("Y"))

    {

    break;

    }

    else if(c.equals("N"))

    {

    s[i].setmathematicsscore(x1);

    break;

    }

    }

    case 2:System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 请输入修改后的大学英语成绩:XXX               ");

    s[i].setenglishscore(shuru.nextDouble());

    if(s[i].getenglishscore()>0&&s[i].getenglishscore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");

    String c=shuru.next();

    if(c.equals("Y"))

    {

    break;

    }

    if(c.equals("N"))

    {

    s[i].setenglishscore(x2);

    break;

    }

    }

    case 3:System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 请输入修改后的计算机网络成绩:XXX               ");

    s[i].setnetworkscore(shuru.nextDouble());

    if(s[i].getnetworkscore()>0&&s[i].getnetworkscore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");

    String c=shuru.next();

    if(c.equals("Y"))

    {

    break;

    }

    if(c.equals("N"))

    {

    s[i].setnetworkscore(x3);

    break;

    }

    }

    case 4:System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 请输入修改后的数据库成绩:XXX               ");

    s[i].setdatabasescore(shuru.nextDouble());

    if(s[i].getdatabasescore()>0&&s[i].getdatabasescore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");

    String c=shuru.next();

    if(c.equals("Y"))

    {

    break;

    }

    if(c.equals("N"))

    {

    s[i].setdatabasescore(x4);

    break;

    }

    }

    case 5:System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 请输入修改后的软件工程成绩:XXX               ");

    s[i].setsoftwarescore(shuru.nextDouble());

    if(s[i].getsoftwarescore()>0&&s[i].getsoftwarescore()<=100)

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());

    System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());

    System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());

    System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());

    System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());

    System.out.println("****************************************************");

    System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");

    String c=shuru.next();

    if(c.equals("Y"))

    {

    break;

    }

    if(c.equals("N"))

    {

    s[i].setsoftwarescore(x5);

    break;

    }

    }

    }

    }

    }

    }

    }

    public static void jisuanjidian()

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     计算学生成绩绩点计算界面  ");

    System.out.println("****************************************************");

    System.out.println("                     请输入学生学号:XXXXXXXX");

    System.out.println("****************************************************");

    String a=shuru.next();

    double mathematicspoint=0;

    double englishpoint=0;

    double networkpoint=0;

    double databasepoint=0;

    double softwarepoint=0;

    double allpoint=0;

    for(int i=0;i

    {

    if(a.equals(s[i].getstunumber()))

    {

    if(s[i].getmathematicsscore()<60)

    {

    mathematicspoint=0;

    }

    else if(s[i].getmathematicsscore()>60&&s[i].getmathematicsscore()<63.9)

    {

    mathematicspoint=1.0;

    }

    else if(s[i].getmathematicsscore()>64&&s[i].getmathematicsscore()<65.9)

    {

    mathematicspoint=1.5;

    }

    else if(s[i].getmathematicsscore()>66&&s[i].getmathematicsscore()<67.9)

    {

    mathematicspoint=1.7;

    }

    else if(s[i].getmathematicsscore()>68&&s[i].getmathematicsscore()<71.9)

    {

    mathematicspoint=2.0;

    }

    else if(s[i].getmathematicsscore()>72&&s[i].getmathematicsscore()<74.9)

    {

    mathematicspoint=2.3;

    }

    else if(s[i].getmathematicsscore()>75&&s[i].getmathematicsscore()<77.9)

    {

    mathematicspoint=2.7;

    }

    else if(s[i].getmathematicsscore()>78&&s[i].getmathematicsscore()<81.9)

    {

    mathematicspoint=3.0;

    }

    else if(s[i].getmathematicsscore()>82&&s[i].getmathematicsscore()<84.9)

    {

    mathematicspoint=3.3;

    }

    else if(s[i].getmathematicsscore()>85&&s[i].getmathematicsscore()<89.9)

    {

    mathematicspoint=3.7;

    }

    else if(s[i].getmathematicsscore()>=90)

    {

    mathematicspoint=4.0;

    }

    if(s[i].getenglishscore()<60)

    {

    englishpoint=0;

    }

    else if(s[i].getenglishscore()>60&&s[i].getenglishscore()<63.9)

    {

    englishpoint=1.0;

    }

    else if(s[i].getenglishscore()>64&&s[i].getenglishscore()<65.9)

    {

    englishpoint=1.5;

    }

    else if(s[i].getenglishscore()>66&&s[i].getenglishscore()<67.9)

    {

    englishpoint=1.7;

    }

    else if(s[i].getenglishscore()>68&&s[i].getenglishscore()<71.9)

    {

    englishpoint=2.0;

    }

    else if(s[i].getenglishscore()>72&&s[i].getenglishscore()<74.9)

    {

    englishpoint=2.3;

    }

    else if(s[i].getenglishscore()>75&&s[i].getenglishscore()<77.9)

    {

    englishpoint=2.7;

    }

    else if(s[i].getenglishscore()>78&&s[i].getenglishscore()<81.9)

    {

    englishpoint=3.0;

    }

    else if(s[i].getenglishscore()>82&&s[i].getenglishscore()<84.9)

    {

    englishpoint=3.3;

    }

    else if(s[i].getenglishscore()>85&&s[i].getenglishscore()<89.9)

    {

    englishpoint=3.7;

    }

    else if(s[i].getenglishscore()>=90)

    {

    englishpoint=4.0;

    }

    if(s[i].getnetworkscore()<60)

    {

    networkpoint=0;

    }

    else if(s[i].getnetworkscore()>60&&s[i].getnetworkscore()<63.9)

    {

    networkpoint=1.0;

    }

    else if(s[i].getnetworkscore()>64&&s[i].getnetworkscore()<65.9)

    {

    networkpoint=1.5;

    }

    else if(s[i].getnetworkscore()>66&&s[i].getnetworkscore()<67.9)

    {

    networkpoint=1.7;

    }

    else if(s[i].getnetworkscore()>68&&s[i].getnetworkscore()<71.9)

    {

    networkpoint=2.0;

    }

    else if(s[i].getnetworkscore()>72&&s[i].getnetworkscore()<74.9)

    {

    networkpoint=2.3;

    }

    else if(s[i].getnetworkscore()>75&&s[i].getnetworkscore()<77.9)

    {

    networkpoint=2.7;

    }

    else if(s[i].getnetworkscore()>78&&s[i].getnetworkscore()<81.9)

    {

    networkpoint=3.0;

    }

    else if(s[i].getnetworkscore()>82&&s[i].getnetworkscore()<84.9)

    {

    networkpoint=3.3;

    }

    else if(s[i].getnetworkscore()>85&&s[i].getnetworkscore()<89.9)

    {

    networkpoint=3.7;

    }

    else if(s[i].getnetworkscore()>=90)

    {

    networkpoint=4.0;

    }

    if(s[i].getdatabasescore()<60)

    {

    databasepoint=0;

    }

    else if(s[i].getdatabasescore()>60&&s[i].getdatabasescore()<63.9)

    {

    databasepoint=1.0;

    }

    else if(s[i].getdatabasescore()>64&&s[i].getdatabasescore()<65.9)

    {

    databasepoint=1.5;

    }

    else if(s[i].getdatabasescore()>66&&s[i].getdatabasescore()<67.9)

    {

    databasepoint=1.7;

    }

    else if(s[i].getdatabasescore()>68&&s[i].getdatabasescore()<71.9)

    {

    databasepoint=2.0;

    }

    else if(s[i].getdatabasescore()>72&&s[i].getdatabasescore()<74.9)

    {

    databasepoint=2.3;

    }

    else if(s[i].getdatabasescore()>75&&s[i].getdatabasescore()<77.9)

    {

    databasepoint=2.7;

    }

    else if(s[i].getdatabasescore()>78&&s[i].getdatabasescore()<81.9)

    {

    databasepoint=3.0;

    }

    else if(s[i].getdatabasescore()>82&&s[i].getdatabasescore()<84.9)

    {

    databasepoint=3.3;

    }

    else if(s[i].getdatabasescore()>85&&s[i].getdatabasescore()<89.9)

    {

    databasepoint=3.7;

    }

    else if(s[i].getdatabasescore()>=90)

    {

    databasepoint=4.0;

    }

    if(s[i].getsoftwarescore()<60)

    {

    softwarepoint=0;

    }

    else if(s[i].getsoftwarescore()>60&&s[i].getsoftwarescore()<63.9)

    {

    softwarepoint=1.0;

    }

    else if(s[i].getsoftwarescore()>64&&s[i].getsoftwarescore()<65.9)

    {

    softwarepoint=1.5;

    }

    else if(s[i].getsoftwarescore()>66&&s[i].getsoftwarescore()<67.9)

    {

    softwarepoint=1.7;

    }

    else if(s[i].getsoftwarescore()>68&&s[i].getsoftwarescore()<71.9)

    {

    softwarepoint=2.0;

    }

    else if(s[i].getsoftwarescore()>72&&s[i].getsoftwarescore()<74.9)

    {

    softwarepoint=2.3;

    }

    else if(s[i].getsoftwarescore()>75&&s[i].getsoftwarescore()<77.9)

    {

    softwarepoint=2.7;

    }

    else if(s[i].getsoftwarescore()>78&&s[i].getsoftwarescore()<81.9)

    {

    softwarepoint=3.0;

    }

    else if(s[i].getsoftwarescore()>82&&s[i].getsoftwarescore()<84.9)

    {

    softwarepoint=3.3;

    }

    else if(s[i].getsoftwarescore()>85&&s[i].getsoftwarescore()<89.9)

    {

    softwarepoint=3.7;

    }

    else if(s[i].getsoftwarescore()>=90)

    {

    softwarepoint=4.0;

    }

    allpoint=(mathematicspoint*4+englishpoint*3+networkpoint*4+databasepoint*3+databasepoint*2)/16;

    }

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     学生考试成绩录入界面");

    System.out.println("****************************************************");

    System.out.println("                 学生学号:"+s[i].getstunumber());

    System.out.println("                 学生姓名:"+s[i].getname());

    System.out.println("                 1.高等数学成绩绩点:"+mathematicspoint);

    System.out.println("                 2.大学英语成绩绩点:"+englishpoint);

    System.out.println("                 3.计算机网络成绩绩点:"+networkpoint);

    System.out.println("                 4.数据库成绩绩点:"+databasepoint);

    System.out.println("                 5.软件工程成绩绩点:"+softwarepoint);

    System.out.println("                 你的平均学分绩点为:"+allpoint);

    if(allpoint>2)

    {

    System.out.println("                 提示信息:你的学分绩点已达到毕业要求 ");

    }

    if(allpoint<2)

    {

    System.out.println("                 提示信息:你的学分绩点不满足毕业要求");

    }

    System.out.println("                 是否返回系统主界面:(Y/N)");

    System.out.println("****************************************************");

    }

    }

    public static void tuichuxitong()

    {

    System.out.println("****************************************************");

    System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");

    System.out.println("                     制作人:杨青");

    System.out.println("****************************************************");

    }

    public static void main(String[] args) {

    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("*************************************************************");

    coninformation();

    int n;

    n = shuru.nextInt();

    switch (n) {

    case 1:addscore();

    break;

    case 2:xiugaiscore();

    break;

    case 3:jisuanjidian();

    break;

    case 4:tuichuxitong();

    break;

    }

    }

    }

    }

    截图:

    cc3edac06ff7bec30051e9bc5e55abb4.png

    724719d19f648f21e9b8a12eac7298c9.png

    14828f4a8a59023b95f718d9fc97ac63.png

    587cb780a9f3c0992ff3c021d1442995.png

    8a346d463458e1247148216bb5a4193a.png

    8abfb39ba483f6e2940798fccb2a2f1e.png

    展开全文
  • java编写的学生成绩管理系统代码 //student import java.sql.*; public class Student { private String id; private String name; private int math; private int english; private int java; private int ...

    41528d3028836879cd698677c3999917.gif用java编写的学生成绩管理系统代码

    //student import java.sql.*; public class Student { private String id; private String name; private int math; private int english; private int java; private int computer; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getMath() { return math; } public void setMath(int math) { this.math = math; } public int getEnglish() { return english; } public void setEnglish(int english) { this.english = english; } public int getJava() { return java; } public void setJava(int java) { this.java = java; } public int getComputer() { return computer; } public void setComputer(int computer) { puter = computer; } public static void main(String[] args) throws Exception { String id; String cid; String name; int math; int english; int java; int computer; String DBDriver = “sun.jdbc.odbc.JdbcOdbcDriver“; String conStr = “jdbc:odbc:student“; Connection con = null; Statement stmt = null; ResultSet rs = null; Class.forName(DBDriver); con = DriverManager.getConnection(conStr, “student“, “123“); stmt = con.createStatement(); String s = “\n\n\t\t\t学 生 成 绩\n\n\t\t 1 新 增\n\t\t 2 更 改\n\t\t 3 删 除\n\t\t 4 查 找\n\t\t 5 显 示\n\t\t 0 退 出\n\n“; System.out.print(s); int choice = Keyboard.getInteger(); switch (choice) { // 添加学生 case 1: System.out.print(“请输入学生信息\n“); System.out.print(“学号:“); id = Keyboard.getString(); System.out.print(“姓名:“); name = Keyboard.getString(); System.out.print(“数学:“); math = Keyboard.getInteger(); System.out.print(“英语:“); english = Keyboard.getInteger(); System.out.print(“JAVA:“); java = Keyboard.getInteger(); System.out.print(“计算机:“); computer = Keyboard.getInteger(); stmt.cuteUpdate(“insert into lxh1 values( “ + id + “ , “ + name + “ , “ + math + “ , “ + english + “ , “ + java + “ , “ + computer + “ )“); System.out.println(“\n添加完成。“); break; // 更改成绩 case 2: System.out.println(“请输入要改的学生学号:“); cid = Keyboard.getString(); System.out.println(“数学:“); math = Keyboard.getInteger(); System.out.println(“英语:“); english = Keyboard.getInteger(); System.out.println(“JAVA:“); java = Keyboard.getInteger(); System.out.println(“计算机:“); computer = Keyboard.getInteger(); stmt.cuteUpdate(“update lxh1 set math= “ + math + “ ,english= “ + english + “ ,java= “ + java + “ ,computer= “ + computer + “ where sno=“ + cid + ““); System.out.println(“\n修改完成“); break; // 删除指定学生 case 3: System.out.println(“请输入要改的学生学号:“); cid = Keyboard.getString(); stmt.cuteUpdate(“delete from lxh1 where

    展开全文
  • java编写学生成绩管理系统,使用文本输入流
  • 使用JAVA编写学生成绩管理系统的撒大大大大
  • 思路:定义两个类,一个scoreinformation类,一个scoremanagement类,scoreinformation类用于编写姓名,学号,以及各项成绩的输入函数,scoreinformation类有七个私有变量,和各个变量的get(),set()函数,...

    思路:定义两个类,一个scoreinformation类,一个scoremanagement类,scoreinformation类用于编写姓名,学号,以及各项成绩的输入函数,scoreinformation类有七个私有变量,和各个变量的get(),set()函数,scoremanagement类用于表现各项功能,包括学生信息的引入函数,学生信息的添加函数,学生信息的修改函数,学生成绩绩点的计算函数,以及退出系统的函数,在最后的主函数中,首先调用存储学生信息的函数,然后运用switch,case函数对各个函数进行调用,对应各项功能,进行函数的调用。

    代码:scoreinformation类:

    package xueshengxuejiguanlixitong;
    public class scoreinformation {
     private String stunumber;
     private String name;
     private double mathematicsscore;
     private double englishscore;
     private double networkscore;
     private double databasescore;
     private double softwarescore;
     public void setstunumber(String stunumber)
     {
        this.stunumber = stunumber;
     }
     public String getstunumber()
     {
      return stunumber;
     }
     public void setname(String name)
     {
         this.name = name;
     }
     public String getname()
     {
          return name; 
     }
        public void setmathematicsscore(double mathematicsscore)
        {
         this.mathematicsscore = mathematicsscore;
        }
        public double getmathematicsscore()
        {
         return mathematicsscore;
        }
        public void setenglishscore(double englishscore)
        {
         this.englishscore = englishscore;
        }
        public double getenglishscore()
        {
         return englishscore;
        }
        public void setnetworkscore(double networkscore)
        {
         this.networkscore = networkscore;
        }
        public double getnetworkscore()
        {
         return networkscore;
        }
        public void setdatabasescore(double databasescore)
        {
         this.databasescore = databasescore;
        }
        public double getdatabasescore()
        {
         return databasescore;
        }
        public void setsoftwarescore(double softwarescore)
        {
         this.softwarescore = softwarescore;
        }
        public double getsoftwarescore()
        {
         return softwarescore;
        }
    }
    scoremanagement类:
    package xueshengxuejiguanlixitong;
    import java.util.Scanner;
    public class ScoreManagement {
     static scoreinformation s[] = new  scoreinformation[100];
     static int sum = 5;
     static Scanner shuru = new Scanner(System.in);
     
     public static void coninformation()
     {
      s[0] = new scoreinformation();
      s[0].setstunumber("20183737");
      s[0].setname("杨青");
      s[0].setmathematicsscore(0);
      s[0].setenglishscore(0);
      s[0].setnetworkscore(0);
      s[0].setdatabasescore(0);
      s[0].setsoftwarescore(0);
      s[1] = new scoreinformation();
      s[1].setstunumber("20183738");
      s[1].setname("张三");
      s[1].setmathematicsscore(0);
      s[1].setenglishscore(0);
      s[1].setnetworkscore(0);
      s[1].setdatabasescore(0);
      s[1].setsoftwarescore(0);
      s[2] = new scoreinformation();
      s[2].setstunumber("20183739");
      s[2].setname("李四");
      s[2].setmathematicsscore(0);
      s[2].setenglishscore(0);
      s[2].setnetworkscore(0);
      s[2].setdatabasescore(0);
      s[2].setsoftwarescore(0);
      s[3] = new scoreinformation();
      s[3].setstunumber("20183740");
      s[3].setname("王五");
      s[3].setmathematicsscore(0);
      s[3].setenglishscore(0);
      s[3].setnetworkscore(0);
      s[3].setdatabasescore(0);
      s[3].setsoftwarescore(0);
      s[4] = new scoreinformation();
      s[4].setstunumber("20183741");
      s[4].setname("李六");
      s[4].setmathematicsscore(0);
      s[4].setenglishscore(0);
      s[4].setnetworkscore(0);
      s[4].setdatabasescore(0);
      s[4].setsoftwarescore(0);
     }
     public static  void addscore()
     {
      while (true)
      {
      int t=0;
      System.out.println("*****************************************************");
      System.out.println("        石家庄铁道大学软件工程系学生学籍管理系统2019版");
      System.out.println("               学生考试成绩录入界面");
      System.out.println("****************************************************");
      System.out.println("               请输入学生学号:********");
      System.out.println("****************************************************");
      System.out.println("请输入八位的学号:");
      String a=shuru.next();
      for(int i=0;i<sum;i++)
      {
       if(a.equals(s[i].getstunumber()))
       {
        System.out.println("****************************************************");
        System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
        System.out.println("                     学生考试成绩录入界面");
        System.out.println("****************************************************");
        System.out.println("                 学生学号:"+s[i].getstunumber());
        System.out.println("                 学生姓名:"+s[i].getname());
        System.out.println("                 请输入高等数学成绩:");
        System.out.println("****************************************************");
        s[i].setmathematicsscore(shuru.nextDouble());
        if(s[i].getmathematicsscore()>0&&s[i].getmathematicsscore()<=100)
        {
         System.out.println("****************************************************");
         System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
         System.out.println("                     学生考试成绩录入界面");
         System.out.println("****************************************************");
         System.out.println("                 学生学号:"+s[i].getstunumber());
         System.out.println("                 学生姓名:"+s[i].getname());
         System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());
         System.out.println("                 请输入大学英语成绩:");
         System.out.println("****************************************************");
         s[i].setenglishscore(shuru.nextDouble());
         if(s[i].getenglishscore()>0&&s[i].getenglishscore()<=100)
         {
          System.out.println("****************************************************");
          System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
          System.out.println("                     学生考试成绩录入界面");
          System.out.println("****************************************************");
          System.out.println("                 学生学号:"+s[i].getstunumber());
          System.out.println("                 学生姓名:"+s[i].getname());
          System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());
          System.out.println("                 大学英语成绩:"+s[i].getenglishscore());
          System.out.println("                 请输入计算机网络成绩:");
          System.out.println("****************************************************");
          s[i].setnetworkscore(shuru.nextDouble());
          if(s[i].getnetworkscore()>0&&s[i].getnetworkscore()<=100)
          {
           System.out.println("****************************************************");
           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
           System.out.println("                     学生考试成绩录入界面");
           System.out.println("****************************************************");
           System.out.println("                 学生学号:"+s[i].getstunumber());
           System.out.println("                 学生姓名:"+s[i].getname());
           System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());
           System.out.println("                 大学英语成绩:"+s[i].getenglishscore());
           System.out.println("                 计算机网络成绩:"+s[i].getnetworkscore());
           System.out.println("                 请输入数据库成绩:");
           System.out.println("****************************************************");
           s[i].setdatabasescore(shuru.nextDouble());
           if(s[i].getdatabasescore()>0&&s[i].getdatabasescore()<100)
           {
            System.out.println("****************************************************");
            System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
            System.out.println("                     学生考试成绩录入界面");
            System.out.println("****************************************************");
            System.out.println("                 学生学号:"+s[i].getstunumber());
            System.out.println("                 学生姓名:"+s[i].getname());
            System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());
            System.out.println("                 大学英语成绩:"+s[i].getenglishscore());
            System.out.println("                 计算机网络成绩:"+s[i].getnetworkscore());
            System.out.println("                 输入数据库成绩:"+s[i].getdatabasescore());
            System.out.println("                 请输入软件工程成绩:");
            System.out.println("****************************************************");
            s[i].setsoftwarescore(shuru.nextDouble());
            if(s[i].getsoftwarescore()>0&&s[i].getsoftwarescore()<=100)
            {
             System.out.println("****************************************************");
             System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
             System.out.println("                     学生考试成绩录入界面");
             System.out.println("****************************************************");
             System.out.println("                 学生学号:"+s[i].getstunumber());
             System.out.println("                 学生姓名:"+s[i].getname());
             System.out.println("                 高等数学成绩:"+s[i].getmathematicsscore());
             System.out.println("                 大学英语成绩:"+s[i].getenglishscore());
             System.out.println("                 计算机网络成绩:"+s[i].getnetworkscore());
             System.out.println("                 数据库成绩:"+s[i].getdatabasescore());
             System.out.println("                 软件工程成绩:"+s[i].getsoftwarescore());
             System.out.println("****************************************************");
             System.out.println("       该学生成绩已录入完毕,是否提交(Y/N)");
             String c=shuru.next();
             if(c.equals("Y"))
              {
                 t=1;
                 break;
              }
             
             else {
              s[i].setmathematicsscore(0);
              s[i].setenglishscore(0);
              s[i].setnetworkscore(0);
              s[i].setdatabasescore(0);
              s[i].setsoftwarescore(0);
              break;}
             }
            else {t=0;break;}
           }
           else {t=0;break;}
          }
          else {t=0;break;}
          
         }
         else {t=0;break;}
        }
        else if(i==sum)
        {
         t=0;
         break;
        }
       }
       
      }
      if(t==1)break;
      }
     }
     public static void xiugaiscore()
     {
      
      int m = 0;
      while (true)
      {
      System.out.println("*****************************************************");
      System.out.println("        石家庄铁道大学软件工程系学生学籍管理系统2019版");
      System.out.println("               学生考试成绩录入界面");
      System.out.println("****************************************************");
      System.out.println("               请输入学生学号:********");
      System.out.println("****************************************************");
      System.out.println("请输入八位的学号:");
      String a=shuru.next();
      for(int i=0;i<sum;i++)
      {
       if(a.equals(s[i].getstunumber()))
       {
              System.out.println("****************************************************");
        System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
        System.out.println("                     学生考试成绩修改界面");
        System.out.println("****************************************************");
        System.out.println("                 学生学号:"+s[i].getstunumber());
        System.out.println("                 学生姓名:"+s[i].getname());
        System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());
        System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());
        System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());
        System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());
        System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());
        System.out.println("****************************************************");
        double x1,x2,x3,x4,x5;
        x1 = s[i].getmathematicsscore();
        x2 = s[i].getenglishscore();
        x3 = s[i].getnetworkscore();
        x4 = s[i].getdatabasescore();
        x5 = s[i].getsoftwarescore();
        m = shuru.nextInt();
              switch(m){
              case 1:System.out.println("****************************************************");
                     System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
                     System.out.println("                     学生考试成绩录入界面");
                     System.out.println("****************************************************");
                     System.out.println("                 学生学号:"+s[i].getstunumber());
                     System.out.println("                 学生姓名:"+s[i].getname());
                     System.out.println("                 请输入修改后的高等数学成绩:XXX               ");
                     s[i].setmathematicsscore(shuru.nextDouble());
                     if(s[i].getmathematicsscore()>0&&s[i].getmathematicsscore()<=100)
          {
           System.out.println("****************************************************");
           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
           System.out.println("                     学生考试成绩录入界面");
           System.out.println("****************************************************");
           System.out.println("                 学生学号:"+s[i].getstunumber());
           System.out.println("                 学生姓名:"+s[i].getname());
           System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());
           System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());
           System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());
           System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());
           System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());
           System.out.println("****************************************************");
           System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");
           String c=shuru.next();
           if(c.equals("Y"))
           {
               break; 
           }
           else if(c.equals("N"))
           {
            s[i].setmathematicsscore(x1);
            break;
           }
           
          }
              case 2:System.out.println("****************************************************");
                        System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
                        System.out.println("                     学生考试成绩录入界面");
                        System.out.println("****************************************************");
                        System.out.println("                 学生学号:"+s[i].getstunumber());
                        System.out.println("                 学生姓名:"+s[i].getname());
                        System.out.println("                 请输入修改后的大学英语成绩:XXX               ");
                        s[i].setenglishscore(shuru.nextDouble());
                        if(s[i].getenglishscore()>0&&s[i].getenglishscore()<=100)
          {
           System.out.println("****************************************************");
           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
           System.out.println("                     学生考试成绩录入界面");
           System.out.println("****************************************************");
           System.out.println("                 学生学号:"+s[i].getstunumber());
           System.out.println("                 学生姓名:"+s[i].getname());
           System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());
           System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());
           System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());
           System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());
           System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());
           System.out.println("****************************************************");
           System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");
           String c=shuru.next();
           if(c.equals("Y"))
           {
               break; 
           }
           if(c.equals("N"))
           {
            s[i].setenglishscore(x2);
            break;
           }
           
          }
              case 3:System.out.println("****************************************************");
                           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
                           System.out.println("                     学生考试成绩录入界面");
                           System.out.println("****************************************************");
                           System.out.println("                 学生学号:"+s[i].getstunumber());
                           System.out.println("                 学生姓名:"+s[i].getname());
                           System.out.println("                 请输入修改后的计算机网络成绩:XXX               ");
                           s[i].setnetworkscore(shuru.nextDouble());
                           if(s[i].getnetworkscore()>0&&s[i].getnetworkscore()<=100)
          {
           System.out.println("****************************************************");
           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
           System.out.println("                     学生考试成绩录入界面");
           System.out.println("****************************************************");
           System.out.println("                 学生学号:"+s[i].getstunumber());
           System.out.println("                 学生姓名:"+s[i].getname());
           System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());
           System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());
           System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());
           System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());
           System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());
           System.out.println("****************************************************");
           System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");
           String c=shuru.next();
           if(c.equals("Y"))
           {
               break; 
           }
           if(c.equals("N"))
           {
            s[i].setnetworkscore(x3);
            break;
           }
           
          }
              case 4:System.out.println("****************************************************");
                           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
                           System.out.println("                     学生考试成绩录入界面");
                           System.out.println("****************************************************");
                           System.out.println("                 学生学号:"+s[i].getstunumber());
                           System.out.println("                 学生姓名:"+s[i].getname());
                           System.out.println("                 请输入修改后的数据库成绩:XXX               ");
                           s[i].setdatabasescore(shuru.nextDouble());
                           if(s[i].getdatabasescore()>0&&s[i].getdatabasescore()<=100)
          {
           System.out.println("****************************************************");
           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
           System.out.println("                     学生考试成绩录入界面");
           System.out.println("****************************************************");
           System.out.println("                 学生学号:"+s[i].getstunumber());
           System.out.println("                 学生姓名:"+s[i].getname());
           System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());
           System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());
           System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());
           System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());
           System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());
           System.out.println("****************************************************");
           System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");
           String c=shuru.next();
           if(c.equals("Y"))
           {
               break; 
           }
           if(c.equals("N"))
           {
            s[i].setdatabasescore(x4);
            break;
           }
           
          }
              case 5:System.out.println("****************************************************");
                           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
                           System.out.println("                     学生考试成绩录入界面");
                           System.out.println("****************************************************");
                           System.out.println("                 学生学号:"+s[i].getstunumber());
                           System.out.println("                 学生姓名:"+s[i].getname());
                           System.out.println("                 请输入修改后的软件工程成绩:XXX               ");
                           s[i].setsoftwarescore(shuru.nextDouble());
                           if(s[i].getsoftwarescore()>0&&s[i].getsoftwarescore()<=100)
          {
           System.out.println("****************************************************");
           System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
           System.out.println("                     学生考试成绩录入界面");
           System.out.println("****************************************************");
           System.out.println("                 学生学号:"+s[i].getstunumber());
           System.out.println("                 学生姓名:"+s[i].getname());
           System.out.println("                 1.高等数学成绩:"+s[i].getmathematicsscore());
           System.out.println("                 2.大学英语成绩:"+s[i].getenglishscore());
           System.out.println("                 3.计算机网络成绩:"+s[i].getnetworkscore());
           System.out.println("                 4.数据库成绩:"+s[i].getdatabasescore());
           System.out.println("                 5.软件工程成绩:"+s[i].getsoftwarescore());
           System.out.println("****************************************************");
           System.out.println("                 该学生成绩已修改完毕,是否提交(Y/N)");
           String c=shuru.next();
           if(c.equals("Y"))
           {
               break; 
           }
           if(c.equals("N"))
           {
            s[i].setsoftwarescore(x5);
            break;
           }
           
          }
                          
             }
       }
      }
      }
     }
     public static void jisuanjidian()
     {
      System.out.println("****************************************************");
            System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
            System.out.println("                     计算学生成绩绩点计算界面  ");
            System.out.println("****************************************************");
            System.out.println("                     请输入学生学号:XXXXXXXX");
            System.out.println("****************************************************");
            String a=shuru.next();
            double mathematicspoint=0;
            double englishpoint=0;
            double networkpoint=0;
            double databasepoint=0;
            double softwarepoint=0;
            double allpoint=0;
      for(int i=0;i<sum;i++)
      {
       if(a.equals(s[i].getstunumber()))
       {
        if(s[i].getmathematicsscore()<60)
        {
         mathematicspoint=0;
        }
        else if(s[i].getmathematicsscore()>60&&s[i].getmathematicsscore()<63.9)
        {
         mathematicspoint=1.0;
        }
        else if(s[i].getmathematicsscore()>64&&s[i].getmathematicsscore()<65.9)
        {
         mathematicspoint=1.5; 
        }
        else if(s[i].getmathematicsscore()>66&&s[i].getmathematicsscore()<67.9)
        {
         mathematicspoint=1.7; 
        }
        else if(s[i].getmathematicsscore()>68&&s[i].getmathematicsscore()<71.9)
        {
         mathematicspoint=2.0; 
        }
        else if(s[i].getmathematicsscore()>72&&s[i].getmathematicsscore()<74.9)
        {
         mathematicspoint=2.3; 
        }
        else if(s[i].getmathematicsscore()>75&&s[i].getmathematicsscore()<77.9)
        {
         mathematicspoint=2.7;  
        }
        else if(s[i].getmathematicsscore()>78&&s[i].getmathematicsscore()<81.9)
        {
         mathematicspoint=3.0;
        }
        else if(s[i].getmathematicsscore()>82&&s[i].getmathematicsscore()<84.9)
        {
         mathematicspoint=3.3;
        }
        else if(s[i].getmathematicsscore()>85&&s[i].getmathematicsscore()<89.9)
        {
         mathematicspoint=3.7;
        }
        else if(s[i].getmathematicsscore()>=90)
        {
         mathematicspoint=4.0;
        }
        if(s[i].getenglishscore()<60)
        {
         englishpoint=0;
        }
        else if(s[i].getenglishscore()>60&&s[i].getenglishscore()<63.9)
        {
         englishpoint=1.0;
        }
        else if(s[i].getenglishscore()>64&&s[i].getenglishscore()<65.9)
        {
         englishpoint=1.5; 
        }
        else if(s[i].getenglishscore()>66&&s[i].getenglishscore()<67.9)
        {
         englishpoint=1.7; 
        }
        else if(s[i].getenglishscore()>68&&s[i].getenglishscore()<71.9)
        {
         englishpoint=2.0; 
        }
        else if(s[i].getenglishscore()>72&&s[i].getenglishscore()<74.9)
        {
         englishpoint=2.3; 
        }
        else if(s[i].getenglishscore()>75&&s[i].getenglishscore()<77.9)
        {
         englishpoint=2.7;  
        }
        else if(s[i].getenglishscore()>78&&s[i].getenglishscore()<81.9)
        {
         englishpoint=3.0;
        }
        else if(s[i].getenglishscore()>82&&s[i].getenglishscore()<84.9)
        {
         englishpoint=3.3;
        }
        else if(s[i].getenglishscore()>85&&s[i].getenglishscore()<89.9)
        {
         englishpoint=3.7;
        }
        else if(s[i].getenglishscore()>=90)
        {
         englishpoint=4.0;
        }
        if(s[i].getnetworkscore()<60)
        {
         networkpoint=0;
        }
        else if(s[i].getnetworkscore()>60&&s[i].getnetworkscore()<63.9)
        {
         networkpoint=1.0;
        }
        else if(s[i].getnetworkscore()>64&&s[i].getnetworkscore()<65.9)
        {
         networkpoint=1.5; 
        }
        else if(s[i].getnetworkscore()>66&&s[i].getnetworkscore()<67.9)
        {
         networkpoint=1.7; 
        }
        else if(s[i].getnetworkscore()>68&&s[i].getnetworkscore()<71.9)
        {
         networkpoint=2.0; 
        }
        else if(s[i].getnetworkscore()>72&&s[i].getnetworkscore()<74.9)
        {
         networkpoint=2.3; 
        }
        else if(s[i].getnetworkscore()>75&&s[i].getnetworkscore()<77.9)
        {
         networkpoint=2.7;  
        }
        else if(s[i].getnetworkscore()>78&&s[i].getnetworkscore()<81.9)
        {
         networkpoint=3.0;
        }
        else if(s[i].getnetworkscore()>82&&s[i].getnetworkscore()<84.9)
        {
         networkpoint=3.3;
        }
        else if(s[i].getnetworkscore()>85&&s[i].getnetworkscore()<89.9)
        {
         networkpoint=3.7;
        }
        else if(s[i].getnetworkscore()>=90)
        {
         networkpoint=4.0;
        }
        if(s[i].getdatabasescore()<60)
        {
         databasepoint=0;
        }
        else if(s[i].getdatabasescore()>60&&s[i].getdatabasescore()<63.9)
        {
         databasepoint=1.0;
        }
        else if(s[i].getdatabasescore()>64&&s[i].getdatabasescore()<65.9)
        {
         databasepoint=1.5; 
        }
        else if(s[i].getdatabasescore()>66&&s[i].getdatabasescore()<67.9)
        {
         databasepoint=1.7; 
        }
        else if(s[i].getdatabasescore()>68&&s[i].getdatabasescore()<71.9)
        {
         databasepoint=2.0; 
        }
        else if(s[i].getdatabasescore()>72&&s[i].getdatabasescore()<74.9)
        {
         databasepoint=2.3; 
        }
        else if(s[i].getdatabasescore()>75&&s[i].getdatabasescore()<77.9)
        {
         databasepoint=2.7;  
        }
        else if(s[i].getdatabasescore()>78&&s[i].getdatabasescore()<81.9)
        {
         databasepoint=3.0;
        }
        else if(s[i].getdatabasescore()>82&&s[i].getdatabasescore()<84.9)
        {
         databasepoint=3.3;
        }
        else if(s[i].getdatabasescore()>85&&s[i].getdatabasescore()<89.9)
        {
         databasepoint=3.7;
        }
        else if(s[i].getdatabasescore()>=90)
        {
         databasepoint=4.0;
        }
        if(s[i].getsoftwarescore()<60)
        {
         softwarepoint=0;
        }
        else if(s[i].getsoftwarescore()>60&&s[i].getsoftwarescore()<63.9)
        {
         softwarepoint=1.0;
        }
        else if(s[i].getsoftwarescore()>64&&s[i].getsoftwarescore()<65.9)
        {
         softwarepoint=1.5; 
        }
        else if(s[i].getsoftwarescore()>66&&s[i].getsoftwarescore()<67.9)
        {
         softwarepoint=1.7; 
        }
        else if(s[i].getsoftwarescore()>68&&s[i].getsoftwarescore()<71.9)
        {
         softwarepoint=2.0; 
        }
        else if(s[i].getsoftwarescore()>72&&s[i].getsoftwarescore()<74.9)
        {
         softwarepoint=2.3; 
        }
        else if(s[i].getsoftwarescore()>75&&s[i].getsoftwarescore()<77.9)
        {
         softwarepoint=2.7;  
        }
        else if(s[i].getsoftwarescore()>78&&s[i].getsoftwarescore()<81.9)
        {
         softwarepoint=3.0;
        }
        else if(s[i].getsoftwarescore()>82&&s[i].getsoftwarescore()<84.9)
        {
         softwarepoint=3.3;
        }
        else if(s[i].getsoftwarescore()>85&&s[i].getsoftwarescore()<89.9)
        {
         softwarepoint=3.7;
        }
        else if(s[i].getsoftwarescore()>=90)
        {
         softwarepoint=4.0;
        }
        allpoint=(mathematicspoint*4+englishpoint*3+networkpoint*4+databasepoint*3+databasepoint*2)/16;
        
       } 
        System.out.println("****************************************************");
        System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
        System.out.println("                     学生考试成绩录入界面");
        System.out.println("****************************************************");
        System.out.println("                 学生学号:"+s[i].getstunumber());
        System.out.println("                 学生姓名:"+s[i].getname());
        System.out.println("                 1.高等数学成绩绩点:"+mathematicspoint);
        System.out.println("                 2.大学英语成绩绩点:"+englishpoint);
        System.out.println("                 3.计算机网络成绩绩点:"+networkpoint);
        System.out.println("                 4.数据库成绩绩点:"+databasepoint);
        System.out.println("                 5.软件工程成绩绩点:"+softwarepoint);
        System.out.println("                 你的平均学分绩点为:"+allpoint);
        if(allpoint>2)
        {
            System.out.println("                 提示信息:你的学分绩点已达到毕业要求 ");
        }
        if(allpoint<2)
        {
         System.out.println("                 提示信息:你的学分绩点不满足毕业要求");
        }
        System.out.println("                 是否返回系统主界面:(Y/N)");
        System.out.println("****************************************************");
       }
           
      }
         
     public static void tuichuxitong()
     {
      System.out.println("****************************************************");
      System.out.println("            石家庄铁道大学软件工程系学生学籍管理系统2019版");
      System.out.println("                     制作人:杨青");
      System.out.println("****************************************************");
     }
     public static void main(String[] args) {
      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("*************************************************************");
            coninformation();
            int n;
            n = shuru.nextInt();
            switch (n) {
            case 1:addscore();
                  break;
            case 2:xiugaiscore();
                   break;
            case 3:jisuanjidian();
                   break;
            case 4:tuichuxitong();
                   break;
            }
     }
     }
    }
    截图:

     

     


     

     


     

     


     

     


     

     


     

     

    转载于:https://www.cnblogs.com/yangqqq/p/11509952.html

    展开全文
  • 该楼层疑似违规已被系统折叠隐藏此楼查看此楼import java.util.HashMap;import java.util.Map;import java.util.Scanner;public class demo {public static void main(String[] args) {Scanner in = new Scanner...
  • java.sql; public?class?Student { private?String?id; private?String?name; private?int?math; private?int?english; private?int?java; private?int?computer; public?String?getId) { return?
  • java编写的学生成绩管理系统源码 初学Java的来
  • java编写的一个学生成绩管理系统 一套软件是否有市场,满足用户需求是关键因素,所以搞清楚用户到底需要什么是软件开发的头等大事。用户需求如何得来?用户有没有把需求描述清楚?如何把用户需求转化成自动化方式...
  • 使用java语言编写的学生成绩管理系统,包含完整的设计文档和SQL语言,可以顺利执行。
  • Java编写的学生成绩管理系统,实现查找某班某同学的成绩,并且可以对各个班级的成绩进行分析:平均分、各个分数段的人数等等
  • 这是一款用java 编写的学生成绩管理系统,里面可以存储学生信息,可以计算及格率。
  • java编写学生管理系统

    2010-11-20 13:30:27
    java编写的一个图书管理系统,包括信息管理,成绩管理的添加,删除还有修改,支持查询,通过这个学习可以更好的学习java程序
  • java编写学生成绩管理系统代码

    万次阅读 2011-09-15 20:36:47
    //student import java.sql.*;   public class Student {  private String id;  private String name;  private int math;
  • 学生成绩管理系统学生成绩管理系统学生成绩管理系统学生成绩管理系统学生成绩管理系统学生成绩管理系统学生成绩管理系统
  • java程序成绩管理系统

    2009-03-31 12:16:01
    适合做课程大作业(Java)成绩管理系统面向对象大作业 Java编写
  • java编写的学生成绩管理系统,数据库为access,大二的java课程设计,附带模拟人工洗牌的算法,源代码直接可以拿来用。
  • java写的一个简单的学生成绩管理系统(含代码).docx用java写的一个简单的学生成绩管理系统一.简洁的需求描述??? 学生成绩管理系统(以下简称系统)为教师和学生的信息交流提供了一个统一的平台,方便了教师对成绩的...
  • java学生成绩管理系统

    2012-10-17 12:47:02
    java编写的命令行的学生成绩管理系统,支持添加学生信息,插入学生成绩,显示所有学生成绩,按学生姓名查询,按学生ID查询等等功能,比较完善了
  • 与今天要介绍的Java版本学生成绩管理系统很相似,但是用c语言编写程序有它自己的弊端。c语言是面向过程的设计语言,而Java是面向对象的设计语言,代码量要比c简单些。但这并不是主要的区别,用面向过程与面向对象所...
  • 学生成句管理系统,实现了基本的录入,读出,删除,查询,排序的功能

空空如也

空空如也

1 2 3 4 5 ... 13
收藏数 249
精华内容 99
关键字:

java编写成绩管理系统

java 订阅