School test student achievement management of Java

First class student

package xuexi;

public class Student {

private String stunumber;
private String name;
private double mathematicsscore;
private double englishiscore;
private double networkscore;
private double databasescore;
private double softwarescore;
public Student(){}
public Student(String stunumber,String name,float mathematicsscore,float englishiscore,float networkscore,float databasescore,float softwarescore){
this.stunumber=stunumber;
this.name=name;
this.mathematicsscore=mathematicsscore;
this.englishiscore=englishiscore;
this.networkscore=networkscore;
this.databasescore=databasescore;
this.softwarescore=softwarescore;

}
public String getstunumber(){
return stunumber;
}
public void setstunumber(String getstunumber){
this.stunumber=stunumber;
}
public String getname(){
return name;
}
public void setname(String name){
this.name=name;
}
public double getmathematicsscore() {
return mathematicsscore;
}
public void setmathematicsscore(double x1) {
this.mathematicsscore = x1;
}
public double getenglishiscore() {
return englishiscore;
}
public void setenglishiscore(double d) {
this.englishiscore = d;
}
public double getdatabasescore() {
return databasescore;
}
public void setdatabasescore(double d) {
this.databasescore = d;
}
public double getnetworkscore() {
return networkscore;
}
public void setnetworkscore(double d) {
this.networkscore = d;
}
public double getsoftwarescore() {
return softwarescore;
}
public void setsoftwarescore(double x5) {
this.softwarescore = x5;
}
}

Then xuexi class

package xuexi;

java.util.Scanner Import;
Import xuexi.Student;
public class of Helo {
static Scanner Scanner new new SC = (the System.in);
static Student S [] = new new Student [100];
static int n-= 0;
public static void MeUn ()
{
System.out.println ( "**************************************** ******************* ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute ");
System.out.println (" student management system 2019 Version ");
System.out.println (" *************************************** ******************** ");
System.out.println (" 1, student test scores entry ");
System.out.println (" 2, student test performance modification ");
System.out.println (" 3, calculate student achievement Grade point ");
System.out.println (" 4, quit school management system ");
System.out.println("***********************************************************");
System.out.println("请选择。。。");
int t=sc.nextInt();
switch(t)
{
case 1:luru();break;
case 2:xiuga();break;
case 3:jisuan();break;
case 4:tuichu();break;
default :System.out.println("请重新输入。。。");meun();break;
}
}

public static void kaishi()
{int i=0;
for(i=0;i<5;i++)
{
s[i]=new Student();
}
s[0] = new Student();
s[0].setstunumber("20183617");
s[0].setname("孙鸿滨");
s[0].setmathematicsscore(0);
s[0].setenglishiscore(0);
s[0].setnetworkscore(0);
s[0].setdatabasescore(0);
s[0].setsoftwarescore(0);
s[1] = new Student();
s[1].setstunumber("20181234");
s[1].setname("张三");
s[1].setmathematicsscore(0);
s[1].setenglishiscore(0);
s[1].setnetworkscore(0);
s[1].setdatabasescore(0);
s[1].setsoftwarescore(0);
s[2] = new Student();
s[2].setstunumber("20185647");
s[2].setname("李四");
s[2].setmathematicsscore(0);
s[2].setenglishiscore(0);
s[2].setnetworkscore(0);
s[2].setdatabasescore(0);
s[2].setsoftwarescore(0);
s[3] = new Student();
s[3].setstunumber("20181245");
s[3].setname("王五");
s[3].setmathematicsscore(0);
s[3].setenglishiscore(0);
s[3].setnetworkscore(0);
s[3].setdatabasescore(0);
s[3].setsoftwarescore(0);
s[4] = new Student();
s[4].setstunumber("20183355");
s[4].setname("李六");
s[4].setmathematicsscore(0);
s[4].setenglishiscore(0);
s[4].setnetworkscore(0);
s[4].setdatabasescore(0);
s[4].setsoftwarescore(0);
}
Public static void tuichu ()
{
System.out.println ( "*********************************** ***************** ");
System.out.println (" Thank you for the use of Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println ( "producer: Sun Hongbin");
System.out.println ( "*********************************** ******************************************************** ");
System.exit (-1);
}
public static void luru ()
{
the while (to true)
{
int = T 0;
the System.out. println ( "*********************************************** ****** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores input interface ");
System.out. println ( "*********************************************** ***** ");
System.out.println ( "Enter the student number: ********");
System.out.println ( "******************* ********************************* ");
System.out.println (" Please enter the eight-digit student number : ");
String sc.next A = ();

for (int I = 0; I <n-; I ++)
{
IF (a.equals (S [I] .getstunumber ()))
{
System.out.println ( "************************************************* *** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores input interface ");
System.out.println (" ************************************************** ** ");
System.out.println (" student number: "+ S [I] .getstunumber ());
System.out.println (" student name: "+ s [i] .getname ());
System.out.println ( "Please enter higher mathematics achievement: ");
System.out.println ( "******************************************* *************************************** ");
S [I] .setmathematicsscore (sc.nextDouble ());
IF (S [I] .getmathematicsscore ()> 0 && S [I] .getmathematicsscore () <= 100)
{
System.out.println ( "******************************************* ********* ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores input interface ");
system .out.println ( "******************************************** ******** ");
System.out.println (" student number: "+ s [i] .getstunumber ());
System.out.println (" student name: "+ s [i] .getName ());
System.out.println ( "higher mathematics achievement:" + S [i] .getmathematicsscore ());
System.out.println ( "Please enter university English scores:");
System.out.println("****************************************************");
S [I] .setenglishiscore (sc.nextDouble ());
IF (S [I] .getenglishiscore ()> 0 && S [I] .getenglishiscore () <= 100)
{
System.out.println ( "***** *********************************************** ");
System.out.println ( "Shijiazhuang Railway Institute of software Engineering student management system version 2019");
System.out.println ( "student test scores input interface");
System.out.println ( "****** ********************************************** ");
System .out.println ( "student number:" + S [I] .getstunumber ());
System.out.println ( "student name:" S + [I] .getName ());
System.out.println ( "Higher math:" + S [i] .getmathematicsscore ());
System.out.println ( "university English scores:" + S [i] .getenglishiscore ());
System.out.println ( "Please enter the computer network performance: ");
System.out.println ("****************************************************");
S [I] .setnetworkscore (sc.nextDouble ());
IF (S [I] .getnetworkscore ()> 0 && S [I] .getnetworkscore () <= 100)
{
System.out.println ( "***** *********************************************** ");
System.out.println ( "Shijiazhuang Railway Institute of software Engineering student management system version 2019");
System.out.println ( "student test scores input interface");
System.out.println ( "****** ********************************************** ");
System .out.println ( "student number:" + S [I] .getstunumber ());
System.out.println ( "student name:" S + [I] .getName ());
System.out.println ( "Higher math:" + S [i] .getmathematicsscore ());
System.out.println ( "university English scores:" + S [i] .getenglishiscore ());
System.out.println ( "computer network performance : "S + [I] .getnetworkscore ());
the System.out.println ( "Please enter the database performance:");
System.out.println ( "******************************************* *************************************** ");
S [I] .setdatabasescore (sc.nextDouble ());
IF (S [I] .getdatabasescore ()> 0 && S [I] .getdatabasescore () <100)
{
the System .out.println ( "******************************************** ******** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores input interface ");
system. out.println ( "********************************************* ******* ");
System.out.println (" student number: "+ S [I] .getstunumber ());
System.out.println (" student name: "+ s [i]. getName ());
System.out.println ( "higher mathematics achievement:" + S [i] .getmathematicsscore ());
System.out.println ( "university English scores:" + s [i] .getenglishiscore ()) ;
System.out.println ( "Computer Network Results:" + s [i] .getnetworkscore ());
System.out.println ( "Enter the database performance:" + S [i] .getdatabasescore ());
System.out.println ( "Please enter the Software Engineering results:");
System.out.println ( "**** **************************** ") ;
S [I] .setsoftwarescore (sc.nextDouble ());
IF (S [I] .getsoftwarescore ()> 0 && S [I] .getsoftwarescore () <= 100)
{
System.out.println ( "**** **************************** ") ;
System.out.println ( "Shijiazhuang Railway Institute of software Engineering student management system version 2019");
System.out.println ( "student test scores input interface");
System.out.println ( "***** *********************************************** ");
System.out.println ( "student number:" + S [I] .getstunumber ());
System.out.println ( "student name:" S + [I] .getName ());
the System.out.println ( "Advanced math:" + s [i] .getmathematicsscore ());
System.out.println ( "university English scores:" + S [i] .getenglishiscore ());
System.out.println ( "Computer network performance:" + S [i] .getnetworkscore ());
System.out. println ( "database performance:" + S [i] .getdatabasescore ());
System.out.println ( "software engineering achievement:" + S [i] .getsoftwarescore ());
System.out.println ( "** ************************************************** ");
System.out.println (" grade has entered the student completed, whether to submit (the Y / N) ");
String sc.next C = ();
iF (c.equals (" the Y "))
{
T = . 1;
BREAK;
}
the else
{
S [I] .setmathematicsscore (0);
S [I] .setenglishiscore (0);
S [I] .setnetworkscore (0);
S [I] .setdatabasescore (0);
S [I ] .setsoftwarescore (0);
BREAK;
}
}
T 0 = {the else; BREAK;}
}
the else {T = 0; BREAK;}
}
the else {T = 0; BREAK;}

}
the else {T = 0; BREAK;}
}
}
the else IF (I-n-==. 1 ) System.out.println ( "Science the number does not exist");
}
IF (T ==. 1) BREAK;
}
}
public static void xiuga ()
{
the while (to true)
{
System.out.println ( "*** ************************************************* " );
System.out.println ( "Shijiazhuang Railway Institute of software Engineering student management system version 2019");
System.out.println ( "student test scores modification interface");
System.out.println ( "**** **************************** ") ;
System.out.println ( "enter the student number: ********");
System.out.println ( "****************************************************");
A sc.next = String ();
int I;
int m = 0;

for (I = 0; I <n-; I ++)
{
IF (a.equals (S [I] .getstunumber ()))
{
the System.out .println ( "********************************************** ****** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores modification interface ");
System.out. println ( "*********************************************** ***** ");
System.out.println (" student number: "+ S [I] .getstunumber ());
System.out.println (" student name: "+ s [i] .getname ( ));
System.out.println ( "1. higher mathematics achievement:" + S [i] .getmathematicsscore ());
System.out.println ( "2. university English scores:" + s [i] .getenglishiscore ( ));
System.out.println ( "computer network 3. results:" + s [i].getnetworkscore());
System.out.println ( "4. Database Results:" S + [I] .getdatabasescore ());
System.out.println ( "Software Engineering 5. The results:" S + [I] .getsoftwarescore ());
the System .out.println ( "******************************************** ******** ");
Double X1, X2, X3, X4, X5;
X1 = S [I] .getmathematicsscore ();
X2 = S [I] .getenglishiscore ();
X3 = S [I] .getnetworkscore ();
X4 = S [I] .getdatabasescore ();
X5 = S [I] .getsoftwarescore ();
System.out.println ( "Please enter the account to be modified:");
int T;
T = SC .nextInt ();
Switch (T)
{
Case. 1:
System.out.println ( "************************************************************ ********************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out .println ( "Student test scores modification interface ");
System.out.println ( "******************************************* *************************************** ");
System.out.println (" student number: "+ s [i] .getstunumber ());
System.out.println (" student name: "+ s [i ] .getName ());
System.out.println ( "Please enter the higher math modified:");
S [I] .setmathematicsscore (sc.nextDouble ());
BREAK;
Case 2:
System.out.println ( "**************************** **** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores modification interface ");
System.out.println ( "************************************************* *** ");
System.out.println (" student number: "+ S [I] .getstunumber ());
System.out.println (" student name: "+ s [i] .getname ()) ;
System.out.println ( "Please enter university English scores revised:");
S [I] .setenglishiscore (sc.nextDouble ());
BREAK;
Case. 3:
System.out.println ( "************************************************************ **************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student management system version 2019 ");
System.out.println (" student test scores modification interface ");
System.out.println (" ************************************************************ *************************** ");
System.out.println (" student number: "+ s [i] .getstunumber ( ));
System.out.println ( "student name:" + S [i] .getName ());
System.out.println ( "Please enter the computer network performance amended:");
S [i] .setnetworkscore (sc.nextDouble ());
BREAK;

Case. 4:
System.out.println ( "************************************************************ ********************** ");
System.out.println ("Software Engineering Student Management System version 2019 Shijiazhuang Railway Institute ");
System.out.println (" student test scores modification interface ");
System.out.println ( "******************************************* *************************************** ");
System.out.println (" student number: "+ s [i] .getstunumber ());
System.out.println (" student name: "+ s [i ] .getName ());
System.out.println ( "Please enter the database modified score:");
S [I] .setdatabasescore (sc.nextDouble ());
BREAK;
Case. 5:
System.out.println ( "************************************************* *** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores modification interface ");
System.out.println (" ************************************************** ** ");
System.out.println (" student number: "+ S [I] .getstunumber ());
System.out.println (" student name: "+ s [i] .getname ());
System.out.println ( "Please enter the result after modifying software engineering:");
S [I] .setsoftwarescore (sc.nextDouble ());
BREAK;
}
System.out.println ( "************************************************************ ************************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system 2019 Edition ") ;
System.out.println ( "student test scores modification interface");
System.out.println ( "*************************** ************************************************************ ");
System.out.println (" student number: "+ s [i] .getstunumber ()) ;
System.out.println ( "student name:" S + [I] .getName ());
System.out.println ( "1. Higher math:" S + [I] .getmathematicsscore ());
the System. out.println ( "2. university English scores:" + S [i] .getenglishiscore ());
System.out.println ( "3. computer network performance:" + S [i] .getnetworkscore ());
System. out.println ( "4. database results:" + s [i] .getdatabasescore ());
System.out.println ( "5. Software Engineering Results:" + s [i] .getsoftwarescore ());
System.out.println ( "The student achievement has been the modification is completed, whether or not to submit (the Y-/ N)");
System.out.println ( "******************* ********************************* ");
String = n-sc.next ();
IF (n.equals ( "the Y")) {m =. 1; BREAK;}
the else
{
S [I] .setmathematicsscore (X1);
S [I] .setenglishiscore (X2);
S [I] .setnetworkscore (X3);
S [I] .setdatabasescore (X4);
S [I] .setsoftwarescore (X5);
BREAK;
}
}
the else IF (I-n-==. 1)
{
System.out.println ( "Science the number does not exist");
}
}
IF ( ==. 1 m) BREAK;
}
}
public static void jisuan ()
{
System.out.println ( "*************************** ************************************************************ ");
System.out.println ( "Shijiazhuang Railway Institute of Software Engineering Student Management System version 2019");
System.out.println ( "calculate student achievement grade point computing interface");
System.out.println ( "**** **************************** ") ;
System.out.println ( "enter the student number: XXXXXXXX");
System.out.println ( "************************************************************ *************************** ");
Scanner shuru = null;
String shuru.next A = ();
Double mathematicspoint = 0;
Double = 0 englishpoint;
Double networkpoint = 0;
Double databasepoint = 0;
Double softwarepoint = 0;
Double allpoint = 0;
for (int I = 0; I <100; 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].getenglishiscore()<60)
{
englishpoint=0;
}
else if(s[i].getenglishiscore()>60&&s[i].getenglishiscore()<63.9)
{
englishpoint=1.0;
}
else if(s[i].getenglishiscore()>64&&s[i].getenglishiscore()<65.9)
{
englishpoint=1.5;
}
else if(s[i].getenglishiscore()>66&&s[i].getenglishiscore()<67.9)
{
englishpoint=1.7;
}
else if(s[i].getenglishiscore()>68&&s[i].getenglishiscore()<71.9)
{
englishpoint=2.0;
}
else if(s[i].getenglishiscore()>72&&s[i].getenglishiscore()<74.9)
{
englishpoint=2.3;
}
else if(s[i].getenglishiscore()>75&&s[i].getenglishiscore()<77.9)
{
englishpoint=2.7;
}
else if(s[i].getenglishiscore()>78&&s[i].getenglishiscore()<81.9)
{
englishpoint=3.0;
}
else if(s[i].getenglishiscore()>82&&s[i].getenglishiscore()<84.9)
{
englishpoint=3.3;
}
else if(s[i].getenglishiscore()>85&&s[i].getenglishiscore()<89.9)
{
englishpoint=3.7;
}
else if(s[i].getenglishiscore()>=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 (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores input interface ");
system .out.println ( "******************************************** ******** ");
System.out.println (" student number: "+ s [i] .getstunumber ());
System.out.println (" student name: "+ s [i] .getName ());
System.out.println ( "1. Higher math scores for Grade point:" + mathematicspoint);
System.out.println ( "2. university English scores for Grade point:" + englishpoint);
System.out. println ( "3. computer network GPA results:" + networkpoint);
System.out.println ( "GPA 4. results database:" + databasepoint);
System.out.println ( "GPA 5. The results software Engineering: "+ softwarepoint);
System.out.println ("Your GPA is: "+ allpoint);
IF (allpoint> 2)
{
System.out.println ( "message: You have reached Grade Point graduation requirements");
}
IF (allpoint <2)
{
System.out.println ( "message: Your Grade Point does not meet the requirements for graduation." );
}
System.out.println ( "return to the main interface if: (the Y / N)");
System.out.println ( "******************* ********************************* ");
}
String sc.next C = ();
IF (C. the equals ( "the Y")) {MeUn ();}
the else jisuan ();
}


public static void main(String[] args) {
// TODO Auto-generated method stub
kaishi();
while(true)
{
meun();
}

}}

Guess you like

Origin www.cnblogs.com/sunhongbin/p/11515306.html