Software engineering first semester exams

Entitled java system student performance management system, so no file manipulation of content for self-study, there is no real difficulty. When 150 minutes to complete all the tasks. For the first lesson, I feel good. But because moderation is unclear, interface errors on the return of three sub-methods, should be returned to the current function, the result is returned to the home directory, leading to drop points 1.5, the actual score 13.5.

Exam sentiment: in the process of self-study, the less practical operation of the process of its own, resulting in no confidence when writing programs, and some do not pay attention to detail (such as the String class in java, can not directly use '==' to judge the need to use function 'str1.equals (str2)). Java program on a full written or helloword, this became a direct student achievement management system, it is a true lack of preparation. Further, in practice, the preparation of segmented better.

(The title is too long, not listed)

Source code is as follows:

//ScoreInformation.java

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

 

}

 

//ScoreManagement.java

package of school examinations;

import java.util.Scanner;

 


public class ScoreManagement {


static ScoreInformation Private [] = new new STU ScoreInformation [. 6];
static Scanner Scanner Scan new new = (the System.in);
static int I = 0;
static Boolean = Tag to true;
static Boolean = Tag_1 to true;
// main class
public static void main (String [] args) {
the Add ();
the while (Tag_1)
{

Manu ();
int scan.nextInt A = ();
Switch (A) {
Case. 1: luru (); BREAK;
Case 2: xiugai () ; BREAK;
Case. 3: jidian (); BREAK;
Case. 4: = Tag_1 to 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 2019 Edition");
System.out.println ( "Producer: Chausson month");
System.out.println ( "**************************** ******************************* ");
}
// stored
static public void the Add ()
{
STU [0] ScoreInformation new new = ();
STU [0] .setStunumber ( "20,183,745");
STU [0] .setName ( "Chausson month");
STU [. 1] = new new ScoreInformation ();
STU [. 1] .setStunumber ( "20,183,746 ");
STU [. 1] .setName (" by Guo 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("20183749");
stu [4] .setName ( "little fool");
STU [. 5] = new new ScoreInformation ();
STU [. 5] .setStunumber ( "20.18375 million");
STU [. 5] .setName ( "cerebellum residues");
}
/ / menu
static public void Manu ()
{
System.out.println ( "********************************** ************************************************************ ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute ");
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 2019 Edition ") ;
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 = to false;
BREAK;
}
}
IF (Tag == to true)
{
the System.out.the println ( "not present");
}
// exist and continue typing results
the else
{
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 ( "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 ());

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 Results: XXX");
System.out.println ( "******************************************* ********************************************************* ");
STU [I] .setNetworkscore (scan.nextDouble ());

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 ( "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 performance: XXX");
System.out.println ( "***********************************************************");
STU [I] .setDatabasescore (scan.nextDouble ());

System.out.println ( "**************************************************************** *********************************************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute 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 ( "database results:" STU + [I] .getDatabasescore ());
the System. out.println ( "Please enter the software engineering achievement: XXX");
System.out.println ( "***********************************************************");
STU [I] .setSoftwarescore (scan.nextDouble ());

System.out.println ( "**************************************************************** *********************************************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute 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 ( "database results:" STU + [I] .getDatabasescore ());
the System. out.println ( "software engineering achievement:" + STU [i] .getSoftwarescore ());
System.out.println ( "***********************************************************");
System.out.println ( "grade has entered the student completed, whether to submit (the Y / N)");
String scan.next X = ();
// End acknowledgment input
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 scores 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 ()))
{
Tag = to false;
BREAK;
}
}
IF (Tag == to true)
{
System.out.println ( "Science number does not exist");
xiugai ();
}
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 Entry");
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 = scan.nextInt xuanze ();
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 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 the modified Higher math: XXX ");
xiugai STU = [I] .getMathematicsscore ();
STU [I] .setMathematicsscore ( scan.nextDouble ()); BREAK;
Case 2:
System.out.println ( "******************************* **************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute 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 revised English results: 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 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 computer network Results: XXX");
xiugai STU = [I] .getNetworkscore ();
STU [I] .setNetworkscore (scan.nextDouble ()); BREAK;
Case. 4:
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: "+ scan_num2);
System.out.println (" student name: "STU + [I] .getName ());
System.out.println (" Please enter modify database results: XXX ");
xiugai STU = [I] .getDatabasescore ();
STU [I] .setDatabasescore (Scan. 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 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 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 2019 Edition ") ;
System.out.println ( "student test scores Entry");
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 grade has modification, whether to commit (Y / N ) ");
System.out.println (" *************************************** ************************************************************ ");
String scan.next Y = ();
// End acknowledgment input
IF (Y == "the Y")
{
Manu ();
}
IF the else (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 ();
}
}
}
/ / GPA
static void jidian ()
{
System.out.println ( "********************************** ************************************************************ ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system 2019 Edition ");
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)
{
System.out.println ( "Science No. does not exist ");
jidian ();
}
the else
{
System.out.println (" ******************************* **************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute 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 ( "Result 1. Advanced Mathematics point: "+ 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 ()) JS + 4.0 * (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)
{
the System.out.println ( "your grade point average is:" + (double) Math.round (pj * 100) / 100);
System.out.println ( "You have qualified");

}
the else
{
System.out.println ( "your grade point average 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;
the else IF (CJ> = 75)
XF = 2.7;
the else IF (CJ> = 72)
XF = 2.3;
the else IF (CJ> = 68)
XF = 2.0;
the 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;
}
}

Guess you like

Origin www.cnblogs.com/xsy948306073/p/11515227.html