"Shijiazhuang Railway Institute of Software Engineering Student Management System version 2019" java applet production sharing

First attach the complete code:

import java.util.Scanner;

public class SocreInformation {
public SocreInformation(){};
public SocreInformation(String i1,String i2,double i3,double i4,double i5,double i6,double i7)
{stunumber=i1;
name=i2;
mathematicsscore=i3;
englishiscore=i4;
networkscore=i5;
databasescore=i6;
softwarescore=i7;
}
private String stunumber,name;
private double mathematicsscore,englishiscore,networkscore,databasescore,softwarescore;
public String getStunumber() {
return stunumber;
}
public void setStunumber(String stunumber) {
this.stunumber = stunumber;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public double getMathematicsscore() {
return mathematicsscore;
}
public void setMathematicsscore(double mathematicsscore) {
this.mathematicsscore = mathematicsscore;
}
public double getEnglishiscore() {
return englishiscore;
}
public void setEnglishiscore(double englishiscore) {
this.englishiscore = englishiscore;
}
public double getNetworkscore() {
return networkscore;
}
public void setNetworkscore(double networkscore) {
this.networkscore = networkscore;
}
public double getDatabasescore() {
return databasescore;
}
public void setDatabasescore(double databasescore) {
this.databasescore = databasescore;
}
public double getSoftwarescore() {
return softwarescore;
}
public void setSoftwarescore(double softwarescore) {
this.softwarescore = softwarescore;
}


}/*学生成绩信息类*/

public class ScoreManagement {

static Scanner input=new Scanner(System.in);
private int i=0;
private int x;
SocreInformation [] stu=new SocreInformation[5];
public void rest() {
stu[0]=new SocreInformation("20183699","小明",90,84,88,93,85);
stu[1]=new SocreInformation("20183001","小A",89,93,92,82,80);
stu[2]=new SocreInformation("20183002","小B",90,83,67,78,87);
stu[3]=new SocreInformation("20183003","小C",78,85,90,78,84);
stu[4]=new SocreInformation("20183004","小D",88,86,85,98,90);}



public void show() {
System.out.println("****************************");
System.out.println("Software Engineering, University of Shijiazhuang Railway ");
System.out.println (" Student Management System 2019 Edition ");
System.out.println ( "****************************");
System.out.println ( "1, student test scores entry ");
System.out.println (" 2, student test scores modification ");
System.out.println (" 3, calculate student achievement Grade point ");
System.out.println (" 4, quit school management system ");
System.out.println (" **************************** ");
CH ();
}
public void CH ( )
{
X = input.nextInt ();
Switch (X)
{Case. 1: inscore (); BREAK;
Case 2: Change (); BREAK;
Case. 3: Point (); BREAK;
Case. 4: OUT (); BREAK ;
default: System.out.println ( "! bad input information"); Show (); BREAK;

}

}
public void OUT () {
System.out.println ( "*********** ******************************* ");
System.out.println ( "Shijiazhuang Railway Institute of Software Engineering Student Management System version 2019");
System.out.println ( "Producer: Bob");

System.out.println ( "******* *********************************** ");
}
public void Point ()
{String S, S2; C = 0 int; Double La = 0; I = 0;
System.out.println ( "**************************************************************** ************* ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores for Grade point Average Computation ");
System.out.println (" ************************************** **** ");
System.out.println (" enter the student number: ");
System.out.println (" ******************** ************************************************************ ");
S = input.next ();
for (I = 0; I <. 5; I ++)
{
IF (S. equals (stu [i].getStunumber()))
{
c=1;break;

}}
if(c==0) {System.out.println("用户不存在!");point();}
double [] sc=new double[5];
double [] j=new double[5];
sc[0]=stu[i].getMathematicsscore();
sc[1]=stu[i].getEnglishiscore();
sc[2]=stu[i].getNetworkscore();
sc[3]=stu[i].getDatabasescore();
sc[4]=stu[i].getSoftwarescore();
for(int w=0;w<5;w++)
{
if(sc[w]>=90)j[w]=4.0;
if(sc[w]>=85&&sc[w]<90)j[w]=3.7;
if(sc[w]>=82&&sc[w]<85)j[w]=3.3;
if(sc[w]>=78&&sc[w]<82)j[w]=3.0;
if(sc[w]>=75&&sc[w]<78)j[w]=2.7;
if(sc[w]>=72&&sc[w]<75)j[w]=2.3;
if(sc[w]>=68&&sc[w]<72)j[w]=2.0;
if(sc[w]>=66&&sc[w]<68)j[w]=1.7;
if(sc[w]>=64&&sc[w]<66)j[w]=1.5;
IF (SC [W]> = 60 && SC [W] <64) J [W] = 1.0;
IF (SC [W]> = 0 && SC [W] <60) J [W] = 0;

}
J [0] = . 4 * J [0];
J [. 1] =. 3 * J [. 1];
J [2] =. 4 * J [2];
J [. 3] =. 3 * J [. 3];
J [. 4] = 2 * J [. 4];
for (int W = 0; W <. 5; W ++)
{
La + = J [W];
}
La / =. 5;
IF (La> = 2) S2 = "your gpa node has reached graduation requirements! ";
the else s2 =" your Grade point does not meet the requirements for graduation! ";
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: "+ STU [I] .getStunumber ());
the System.out.println ( "Student Name:" + stu ​​[i] .getName ());
System.out.println ( "1, higher math scores for Grade Point:" + J [0]);
System.out.println ( "2, in Achievement Grade Point Average:" + J [1]);
System.out. println ( "3, a computer network GPA results:" + J [2]);
System.out.println ( ". 4, GPA results database:" + J [. 3]);
System.out.println ( ". 5, Grade point software Engineering: "+ J [4]);
System.out.println (" your grade point average is: "+ La);
System.out.println (" message: "+ s2);
System. out.println ( "return to the main interface if: (the Y / N)");
System.out.println ( "************************************************************ ************************************************** ");
S = input.next ();
IF (s.equals (" the Y ")) {Show ();}
the else Point () ;
}

public void Change ()
{
String S; C int = 0; int W; Double A; I = 0;
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 (" enter the student number: ");
System.out.println (" ********** ******************************** ");
S = input.next ();
for (I = 0; I <. 5; I ++)
{
IF (s.equals (STU [I] .getStunumber ()))
{
C =. 1; BREAK;

}}
IF (C == 0) {System.out.println ( "user does not exist! "); Change ();}
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:" + stu ​​[i] .getStunumber ());
System.out.println ( "Student Name:" + STU [i] .getName ());
System.out.println ( "1, higher mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out .println ( "2, university English scores:" + STU [i] .getEnglishiscore ());
System.out.println ( "3, computer network performance:" + STU [i] .getNetworkscore ());
System.out .println ( "4, database performance:" + STU [i] .getDatabasescore ());
System.out.println ( "5, software Engineering:" + STU [i] .getSoftwarescore ());
System.out.println ( "******************************************");
W = INPUT .nextInt ();
Switch (W)
{
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:" + STU [i] .getStunumber ());
System.out.println ( "student name:" + STU [i] .getName ());
System.out .println ( "Please enter the higher mathematics achievement revised:");
System.out.println ( "*************************** *************** ");
A = input.nextDouble ();
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: "+ STU [i] .getStunumber ());
System.out.println (" student name: "+ stu [i] .getName ( ));
System.out.println ( "1, higher math:" + a);
System.out.println ( "2, university English scores:" + STU [i] .getEnglishiscore ());
System.out.println ( "3, computer network performance:" + stu [i] .getNetworkscore ());
System.out.println ( "4, database performance:" + STU [i] .getDatabasescore ());
System.out.println ( "5, software Engineering:" + STU [i] .getSoftwarescore ());
System. out.println ( "student achievement has been the modification is completed, whether or not to submit (the Y-/ N)?");
System.out.println ( "******************** ************************************************************ ");
S = input.next ();
IF (s.equals (" the Y ")) {STU [I]. setMathematicsscore (A); Show ();}
the else Change ();
BREAK; / * number high * /
Case 2: 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:" + STU [i] .getStunumber ());
System.out.println ( "Student Name:" + STU [i] .getName ());
System.out.println ( "Please enter university English scores revised:");
System.out.println ( "**************************************************************** ************* ");
A = input.nextDouble ();
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: "+ STU [i] .getStunumber ());
System.out.println (" student name: "+ STU [I] .getName ());
System.out.println ( ". 1, higher math:" + stu [i] .getMathematicsscore ());
System.out.println ( "2, university English scores:" + a);
System.out.println ( "3, a computer network performance:" STU + [I] .getNetworkscore ());
System.out.println ( ". 4, the database results:" STU + [I] .getDatabasescore ());
the System .out.println ( "5, software Engineering:" + STU [i] .getSoftwarescore ());
System.out.println ( "? student achievement has been the modification is completed, whether or not to submit (the Y-/ N)");
System. out.println ( "******************************************");
input.next = S ();
IF (s.equals ( "the Y")) {STU [I] .setEnglishiscore (A); Show ();}
the else Change ();
BREAK; / * English * /
Case. 3:
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:" + stu [i] .getStunumber ());
System.out.println ( "Student Name:" + STU [i] .getName ());
System.out.println ( "Please enter the computer network performance amended:");
System.out.println ( "** **************************************** ");
A = input.nextDouble () ;
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 student ID: "+ STU [i] .getStunumber ());
System.out.println (" student name: "+ STU [i] .getName ());
System.out.println (" 1, higher mathematics achievement: "+ STU [i] .getMathematicsscore ());
System.out.println (" 2, university English scores: "+ stu [i] .getEnglishiscore ());
System.out.println ( "3, a computer network performance:" + a);
System.out.println ( "4, database performance:" + STU [i] .getDatabasescore ());
System.out.println ( "5, Software Engineering:" + STU [i] .getSoftwarescore ());
System. out.println ( "student achievement has been the modification is completed, whether or not to submit (the Y-/ N)?");
System.out.println ( "******************** ************************************************************ ");
S = input.next ();
IF (s.equals (" the Y ")) {STU [I]. setNetworkscore (A); Show ();}
the else Change ();
BREAK; / * network * /
Case. 4:
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: "+ stu [i] .getStunumber ());
System.out.println ( "Student Name:" + stu [i] .getName ());
System.out.println ( "Please enter the database performance amended:");
System.out.println ( "************************************************************ ******************************************************** ");
A = input.nextDouble ();
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: "+ STU [I] .getStunumber ());
System.out.println (" student name: "+ STU [i] .getName ());
System.out.println (" 1, higher mathematics achievement: "+ STU [i] .getMathematicsscore ());
System.out.println (" 2, English results: "STU + [I] .getEnglishiscore ());
System.out.println (". 3, the computer network performance: "+ stu [i].getNetworkscore ());
System.out.println ( ". 4, the database results:" + a);
System.out.println ( "5, Software Engineering:" + STU [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 ( "******************************************") ;
S = input.next ();
IF (s.equals ( "the Y")) {STU [I] .setNetworkscore (A); Show ();}
the else Change ();
BREAK; / * database * /
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 student ID: "+ STU [i] .getStunumber ());
System.out.println (" student name: "+ stu [i] .getName ());
System.out.println ( "Please enter the modified software engineering achievement:");
System.out.println ( "******************************************" );
A = input.nextDouble ();
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:" + STU [i] .getStunumber ());
System.out.println ( "student name:" + STU [i] .getName ());
System.out. println ( "1, higher mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out.println ( "2, university English scores:" + STU [i] .getEnglishiscore ());
System.out. println ( "3, a computer network performance:" STU + [I] .getNetworkscore ());
System.out.println ( ". 4, the database results:"STU + [I] .getDatabasescore ());
System.out.println ( ". 5, Software Engineering:" + a);
System.out.println ( "The student achievement has been the modification is completed, whether or not to submit (the Y-/ N)?");
System.out.println ( "****************** ************************************************************ ");
S = input.next ();
IF (s.equals (" the Y ")) {STU [I ] .setSoftwarescore (A); Show ();}
the else Change ();
BREAK;
default: BREAK;
}
} / * modify * /
public void inscore ()
{String S; Double SM, SE, Sn, SD, SS; C = 0 int;
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 ( "Please enter the student number:");
System.out.println ( "******************************************");
input.next = S ();
for (I = 0; I <. 5; I ++)
{
IF (s.equals (STU [I] .getStunumber ())) {C =. 1; BREAK;}
}
IF (C = = 0) {System.out.println ( "Science the number does not exist!"); inscore ();}
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: "+ STU [i] .getStunumber ());
System.out.println (" student name: " STU + [I] .getName ());
System.out.println ( "Please enter the higher math:");
System.out.println ( "********************************************************* ************************************************************ ");
SM = input.nextDouble ();
/ * number * high /
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 (" students learn number: "+ STU [i] .getStunumber ());
System.out.println (" student name: "+ STU [i] .getName ());
System.out.println (" higher mathematics achievement: "+ sm );
System.out.println ( "Please enter university English scores:");
System.out.println ( "************************************************************ ***************** ");
SE = input.nextDouble ();
/ * English * /
System.out.println (" ********** ******************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student enrollment management system version 2019 ");
System.out.println ( "student test scores input interface");
System.out.println ( "******************************************" );
System.out.println ( "student number:" + STU [i] .getStunumber ());
System.out.println ( "student name:" + STU [i] .getName ());
System.out .println ( "higher mathematics achievement:" + SM);
System.out.println ( "university English scores:" + SE);
System.out.println ( "Please enter the computer network performance:");
System.out.println ( "******************************************");
Sn = INPUT .nextDouble ();
/ * network * /
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:" + stu ​​[i] .getStunumber ());
System.out.println ( "Student Name:" + STU [i] .getName ());
System.out.println ( "higher mathematics achievement:" + SM);
System.out.println ( "university English scores:" SE +);
System.out.println ( "computer network performance:" + sn);
System.out.println ( "Please enter the database performance:");
System.out.println ( "******** ********************************** ");
SD = input.nextDouble ();
/ * database * /
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 (" students learn number: "+ STU [i] .getStunumber ());
System.out.println (" student name: "STU + [I] .getName ());
System.out.println ( "Advanced math:" + sm);
System.out.println ( "university English scores:" + SE);
System.out.println ( "Computer network performance:" + sn);
System.out.println ( "Database performance:" + SD);
System.out .println ( "Please enter the software Engineering:");
System.out.println ( "******************************* *********** ");
SS = input.nextDouble ();
/ * soft Engineering * /
System.out.println (" *************** *************************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system 2019 Edition " );
System.out.println ( "student test scores input interface");
System.out.println ( "************************** ********************************************************* ");
System.out.println (" student number: "+ STU [I] .getStunumber ());
System.out.println (" student name: "+ STU [I] .getName ());
System.out.println (" Advanced math: "+ sm);
System.out.println ( "university English scores:" + se);
System.out.println ( "Computer network performance:" + sn);
System.out.println ( "Database performance:" + SD);
System.out.println ( "Software Engineering:" + SS);
System.out. println ( "student achievement has been the entry is complete, whether to submit (the Y-/ N)?");
System.out.println ( "********************** ************************************************************ ");
S = input.next ();
IF (s.equals (" the Y ")) {
STU [I] .setMathematicsscore ( SM);
STU [I] .setEnglishiscore (SE);
STU [I] .setNetworkscore (Sn);
STU [I] .setSoftwarescore (SS);
STU [I] .setDatabasescore (SD);
Show ();
}
the else Show ();

}
} / * * class management system /

 

public class infor {

static Scanner input=new Scanner(System.in);
public static void main(String[] args) {
ScoreManagement x=new ScoreManagement();
x.rest();
x.show();

}

} / * Main function * /

Several members of the first student information data contained in the class SocreInformation are students' personal information and its achievements, and all have their own set and get and function, which is ready for the next call and data modification.

Next is the class management system ScoreManagement, which is the core of this program, first defines the length of a student class array 5, and is provided REST () function initializes the student data class object; followed by display program interface function show ( ), his role is the main interface of the display , as to how the functions of the various options on the main interface, which is dependent on its ch call () function, the role ch () function is to get the user to select functions and to achieve jump to the corresponding function ; CH () function swich containing structure, through which call the function corresponding function. That is, each function of the management system are implemented by respective functions, the function corresponding to the function and are

Student test scores entry -inscore ();
student test scores modification -change ();
calculate student achievement grade point -point ();
quit school management system -out () ;

Scores - recording function inscore () by the number of students entered the data retrieval, and find students who meet its achievements entry, entry grades are temporarily stored in its internal variables, when entry is complete the user to confirm the submission, will set function to modify the use of students in class student achievement, and then call the show () to return the main interface. If the user veto submit, call the show () function returns the main interface, student information will not be modified.

Results modify the function change () function is similar to the entry, find the students through the school, you want to modify the results, after the user confirmation will be submitted using the set function really modify student information, and then call the show () to return the main interface. Submit rejected calls show () to return the main interface.

Grade Point Average calculation function point (), according to first find school number of students, due to the range for the various subjects which were calculated based on grade point score, so I am here to define two integer array j [5] and w [5] , with W [5] and get () function to store results Section 5, and then calculate the corresponding GPA the GPA calculation rules and stored in the J [5], the next point of how to count the overall performance is calculated according to rules on it, and finally displayed, and calling the show at the end () return to the main screen.

Exit function out (), to display the contents of some of their own definition, does not call after the show () function, so the program will end this.

main () function, first define a ScoreManagement objects, then out with a rest () function to initialize it to fall on a show () function, so that the program can run.

Guess you like

Origin www.cnblogs.com/liuleliu/p/11505426.html