Information Management java

Code:

package information management; // letter 1805-120183763 Gun

public class ScoreInformation {
private String stunumber = " ";
private String name = " ";
private Double mathematicsscore,englishiscore,networkscore,databasescore,softwarescore;

public String getStunumber() {
return stunumber;
}

public void setStunumber (String saving umber) {
this.stunumber = saving umber;
}

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;
}
}

package information management;

import java.util.Scanner;

public class ScoreManagement {
private static ScoreInformation[] stu = new ScoreInformation[6];
static Scanner scan = new Scanner(System.in);
static int i = 0;
static boolean tag = true;
static boolean tag_1 = true;
//主类
public static void main(String[] args) {
add();
while(tag_1)
{

manu();
int a = scan.nextInt();
switch (a) {
case 1:luru();break;
case 2:xiugai();break;
case 3:jidian();break;
case 4:tag_1=false;break;
default:
break;
}
}
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: Gun");
System.out.println ( "***** ************************************************** **** ");
}
// stored
static public void the Add ()
{
STU [0] = new new ScoreInformation ();
STU [0] .setStunumber (" 20,183,763 ");
STU [0] .setName (" Gun ");
STU [. 1] = new new ScoreInformation ();
STU [. 1] .setStunumber (" 20,183,746 ");
STU [. 1] .setName (" Kuo by new ");
STU [2] = new new ScoreInformation ();
STU [2 ] .setStunumber ( "20,183,747");
STU [2] .setName ( "small bald");
STU [. 3] = new new ScoreInformation ();
STU [. 3] .setStunumber ( "20,183,748");
STU [. 3].setName ( "little fool");
STU [. 4] = new new ScoreInformation ();
STU [. 4] .setStunumber ( "20,183,749");
STU [. 4] .setName ( "little fool");
STU [. 5] = new new ScoreInformation ();
STU [. 5] .setStunumber ( "20.18375 million");
STU [. 5 ] .setName ( "cerebellum residues");
}
// the
static public void Manu ()
{
System.out.println ( "************************************************************ ************************************* ");
System.out.println (" Shijiazhuang Railway Institute software Engineering ");
System.out.println (" student management system version 2019 ");
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 ( "******************************************* **************** ");
}
// input
static public void luru ()
{

System.out.println (" ************* ********************************************** ");
System .out.println ( "Shijiazhuang Railway Institute of software Engineering student management system version 2019");
System.out.println ( "student test scores entry");
System.out.println ( "******** ************************************************** * ");
System.out.println (" enter the student number: XXXXXXXX ");
System.out.println (" ********************** ************************************* ");
String scan_num = scan.next ();


for (I = 0; I <. 6; I ++)
{
IF (scan_num.equals (STU [I].getStunumber()))
{
tag=false;
break;
}
}
IF (Tag == to true)
{
System.out.println ( "not present");
}
// continue to enter the grade and the presence of
the else
{
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 ( "student number:" + scan_num);
System.out.println ( "student name:" + STU [i] .getName ());
System.out.println ( "Please enter the higher mathematics achievement: XXX");
System.out.println ( "* ************************************************** ******** ");
STU [I] .setMathematicsscore (scan.nextDouble ());

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 ( "student number:" + scan_num);
System.out.println ( "student name:" + STU [i] .getName ());
System.out.println ( "higher mathematics achievement:" + STU [i] .getMathematicsscore ());
System. out.println ( "Please enter English results: XXX");
System.out.println ( "**************************************************************** ************************************************************ ");
STU [I] .setEnglishiscore (scan.nextDouble ());

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 (" student number: "+ scan_num);
System.out.println ( "Student Name:" + stu [i] .getName ());
System.out.println ( "higher mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out.println ( "English results:" + STU [i] .getEnglishiscore ());
System.out.println ( "Please enter the computer network performance: XXX");
System.out.println ( "******************************* **************************** ");
STU [I] .setNetworkscore (scan.nextDouble ());

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 ( "student number:" + scan_num);
System.out.println ( "student name:" + STU [i] .getName ());
System.out.println ( "higher mathematics achievement: "STU + [I] .getMathematicsscore ());
System.out.println ("English results: "+ stu ​​[i] .getEnglishiscore ());
System.out.println ( "Computer Network Results:" STU + [I] .getNetworkscore ());
System.out.println ( "Please enter the database results: XXX");
System.out.println ( "**** ************************************************** ***** ");
STU [I] .setDatabasescore (scan.nextDouble ());

System.out.println (" ************************************************************ ************************************** ");
System.out.println (" Shijiazhuang Railway software Engineering student management system version 2019 University ");
System.out.println (" student test scores input interface ");
System.out.println (" student number: "+ scan_num);
System.out.println ( "student name:" + STU [i] .getName ());
System.out.println ( "higher mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out.println ( "English results:" STU + [I] .getEnglishiscore ());
System.out.println ( "Computer Network Results: "+ stu ​​[i] .getNetworkscore ());
System.out.println ( "Database performance:" + STU [i] .getDatabasescore ());
System.out.println ( "Please enter the software engineering achievement: XXX");
System.out.println ( "**** ************************************************** ***** ");
STU [I] .setSoftwarescore (scan.nextDouble ());

System.out.println (" ************************************************************ ************************************** ");
System.out.println (" Shijiazhuang Railway software Engineering student management system version 2019 University ");
System.out.println (" student test scores input interface ");
System.out.println (" student number: "+ scan_num);
System.out.println ( "student name:" + STU [i] .getName ());
System.out.println ( "higher mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out.println ( "English results:" STU + [I] .getEnglishiscore ());
System.out.println ( "Computer Network Results: "+ stu ​​[i] .getNetworkscore ());
System.out.println ( "Database performance:" + STU [i] .getDatabasescore ());
System.out.println ( "Software engineering achievement:" + STU [i] .getSoftwarescore ());
System.out.println ( "**************************** *********** ");
System.out.println (" the completion of student achievement has been entered, whether to submit (the Y-/ N) ");
String = the X-scan.next ();
// input After checking the
IF (X == "the Y")
{
Manu ();
}
the else IF (X == "N")
{
STU [I] .setDatabasescore (0.0);
STU [I] .setEnglishiscore (0.0);
STU [ I] .setMathematicsscore (0.0);
STU [I] .setDatabasescore (0.0);
STU [I] .setNetworkscore (0.0);
luru ();
}

}
}
// modify
static void xiugai ()
{
System.out.println ( "******************************************* **************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test performance modification interface ");
System.out.println (" ************************************* ********************** ");
System.out.println (" enter the student number: XXXXXXXX ");
System.out.println (" * ************************************************** ******** ");
String scan_num2 scan.next = ();
for (I = 0; I <. 6; I ++)
{
IF (scan_num2.equals (STU [I] .getStunumber ()))
{
= to false Tag;
BREAK;
}
}
IF (Tag == to true)
{
System.out.println ( "Science number does not exist");
xiugai ();
}
else
{
System.out.println ( "******************************************* **************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores - recording ");
System.out.println (" ************************************** ********************* ");
System.out.println (" student number: "+ scan_num2);
System.out.println (" student name: "STU + [I] .getName ());
System.out.println (" 1. Higher math: "STU + [I] .getMathematicsscore ());
System.out.println (" English 2. results: " STU + [I] .getEnglishiscore ());
System.out.println ( "computer network 3. results:" STU + [I] .getNetworkscore ());
System.out.println ( "database 4. results:" + STU [I] .getDatabasescore ());
System.out.println ( "software Engineering 5. The results:" + stu [i].getSoftwarescore());
System.out.println ( "******************************************* ********************************************************* ");
int xuanze scan.nextInt = ();
Double xiugai = 0.0;
Switch (xuanze) {
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 input interface ");
System.out .println ( "********************************************** ************* ");
System.out.println (" student number: "+ scan_num2);
System.out.println (" student name: "+ stu [i] .getName ());
System.out.println ( "Please enter the mathematics scores Review: XXX");
xiugai STU = [I] .getMathematicsscore ();
STU [I] .setMathematicsscore (scan.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 performance input interface ");
System.out.println (" ************************************* ********************** ");
System.out.println (" student number: "+ scan_num2);
System.out.println (" student name : "STU + [I] .getName ());
System.out.println (" Please enter grade English Review: XXX ");
xiugai STU = [I] .getEnglishiscore ();
STU [I] .setEnglishiscore (Scan .nextDouble ()); BREAK;
Case. 3:
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: "+ scan_num2);
System.out.println (" student name: "+ stu [i ] .getName ());
System.out.println ( "Please enter the modified computer network results: XXX");
xiugai STU = [I] .getNetworkscore ();
STU [I] .setNetworkscore (scan.nextDouble ()) ; BREAK;
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 input interface");
System.out.println ( "******************************* **************************** ");
System.out.println (" student number: "+ scan_num2);
System.out .println ( "student name:"+stu[i].getName());
System.out.println ( "Please enter the modified database Results: XXX");
xiugai STU = [I] .getDatabasescore ();
STU [I] .setDatabasescore (scan.nextDouble ()); BREAK;
Case. 5:
the System. out.println ( "********************************************* ************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores entry interface ");
System.out.println (" *************************************** ******************** ");
System.out.println (" student number: "+ scan_num2);
System.out.println (" student name: " STU + [i] .getName ());
System.out.println ( "Please enter modify the software engineering achievement: XXX");
xiugai = STU [i] .getSoftwarescore ();
STU [i] .setSoftwarescore (Scan. nextDouble ()); BREAK;
}
System.out.println ( "******************************************* **************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" student test scores - recording ");
System.out.println (" ************************************** ********************* ");
System.out.println (" student number: "+ scan_num2);
System.out.println (" student name: "STU + [I] .getName ());
System.out.println (" 1. Higher math: "STU + [I] .getMathematicsscore ());
System.out.println (" English 2. results: " STU + [I] .getEnglishiscore ());
System.out.println ( "computer network 3. results:" STU + [I] .getNetworkscore ());
System.out.println ( "database 4. results:" + STU [I] .getDatabasescore ());
System.out.println ( "software Engineering 5. The results:" + stu [i].getSoftwarescore ());
System.out.println ( "The student achievement has been the modification is completed, whether to submit (Y / N)");
System.out.println("***********************************************************");
String y= scan.next();
//输入完确认
if(y=="Y")
{
manu();
}
else if(y=="N")
{
switch(xuanze) {
case 1:stu[i].setMathematicsscore(xiugai);break;
case 2:stu[i].setEnglishiscore(xiugai);break;
case 3:stu[i].setNetworkscore(xiugai);break;
case 4:stu[i].setDatabasescore(xiugai);break;
case 5:stu[i].setSoftwarescore(xiugai);break;
}
xiugai();
}
}
}
//绩点
static void jidian()
{
System.out.println("***********************************************************");
System.out.println ( "Shijiazhuang Railway Institute of Software Engineering Student Management System version 2019");
System.out.println ( "student test scores to calculate grade point interface");
System.out.println ( "**** ************************************************** ***** ");
System.out.println (" enter the student number: XXXXXXXX ");
System.out.println (" ****************** ***************************************** ");
String scan_num3 = scan.next ();
for (I = 0; I <. 6; I ++)
{
IF (scan_num3.equals (STU [I] .getStunumber ()))
{
Tag = to false;
BREAK;
}
}
IF (Tag == to true)
{
the System .out.println ( "Science number does not exist");
jidian ();
}
the else
{
System.out.println ( "***********************************************************");
System.out.println ( "Shijiazhuang Railway Institute of Software Engineering Student Management System version 2019");
System.out.println ( "student test scores to calculate grade point interface");
System.out.println ( "**** ************************************************** ***** ");
System.out.println (" student number: "+ scan_num3);
System.out.println (" student name: "+ STU [i] .getName ());
System.out. println ( "1. Higher Mathematics GPA:" + JS (STU [I] .getMathematicsscore ()));
System.out.println ( "GPA 2. English:" + js (stu [i ] .getEnglishiscore () ));
System.out.println ( "GPA 3. computer network:" + js (stu [I] .getNetworkscore ()));
System.out.println ( "GPA 4. database:" + js (stu [I] .getDatabasescore ()));
System.out.println ( "GPA 5. The software Engineering:" + JS (STU [I] .getSoftwarescore ()));
Double PJ = 0.0;
PJ = (JS (STU [i].getMathematicsscore())*4.0+js(stu[i].getEnglishiscore())*3.0+js(stu[i].getNetworkscore())*4.0
JS + (STU [I] .getDatabasescore ()) * 3.0 + JS (STU [I] .getSoftwarescore ()) * 2.0) / (16.0);
IF (PJ> = 2.0)
{
System.out.println ( "you the GPA is: "+ (Double) Math.round (PJ * 100) / 100);
System.out.println (" you have qualified ");

}
the else
{
System.out.println (" your average Grade point is: "+ (Double) Math.round (PJ * 100) / 100);
System.out.println (" You are not qualified ");

}


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

}
static public Double JS (Double CJ)
{
Double XF = 0.0;
IF (CJ> = 90)
XF = 4.0;
the else IF (CJ> = 85)
XF = 3.7;
the else IF (CJ> = 82)
XF = 3.3;
the else IF (CJ>=78)
xf=3.0;
else if(cj>=75)
xf=2.7;
else if(cj>=72)
xf=2.3;
else if(cj>=68)
xf=2.0;
else if(cj>=66)
xf=1.7;
else if(cj>=64)
xf=1.5;
else if(cj>=60)
xf=1.0;
else
xf=0;
return xf;
}
}

This is the java information management system we do, the main use of the two categories. Management made four parts, the information can be entered only established six students. I think the hardest thing to do is score Grade Point Average of them. Calculate the correlation score of feeling a little more difficult to write programs.

 

Guess you like

Origin www.cnblogs.com/moxihuishou/p/11515424.html