Classroom detection

ScoreInformation categories:

package ceshi;


class ScoreInformation {
private String stunumber;
private String name;
private double mathematicsscore;
private double englishiscore;
private double networkscore;
private double databasescore;
private double softwarescore;

public ScoreInformation(){

}

public ScoreInformation(String stunumber, String name, double mathematicsscore, double englishiscore, double networkscore, double databasescore, double 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 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;
}

}
Main类:
package ceshi;

import java.util.*;

public class Main {
static ScoreInformation[] scoreInformations=new ScoreInformation[5];

static int n=0;

public static void main(String args[]){
while (true) {
Scanner scanner = new Scanner(System.in);
caidan1();
int select = 0;
select = scanner.nextInt();
switch (select) {
case 1:
caidan2();
add();
break;
case 2:
caidan3();
updata();
break;
case 4:
quite();
default:
System.exit (0);
BREAK;
}
}
}
static void caidan1 () {
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 ( "*************************** ******************************* ");}
static public void caidan2 () {
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 (" Please enter the student number: ");
}
static public void caidan3 () {
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: ");
System.out.println (" ** ************************************************** ****** ");
}
static public void caidan4 () {
System.out.println (" ************************************************************ ********************************* ");
System.out.println ("Software Engineering, Shijiazhuang Railway Institute Student Management System 2019 Edition ");
System.out.println ( "student test scores modification interface");
System.out.println ( "**************************** ******************************* ");
System.out.println (" Please enter the need to modify the number of subjects: " );
}
static void chushihua () {
scoreInformations [0] = new new ScoreInformation ();
scoreInformations [0] .setName ( "Machuan");
String S = "20,183,561";
scoreInformations [0] .setStunumber (S);
scoreInformations [. 1] = new new ScoreInformation ();
scoreInformations [. 1] .setName ( "John Doe");
String S1 = "20.18 million";
scoreInformations [. 1] .setStunumber (S1);
scoreInformations[2]=new ScoreInformation();
scoreInformations[2].setName("李四");
String s2="20180001";
scoreInformations[2].setStunumber(s2);
scoreInformations[3]=new ScoreInformation();
scoreInformations[3].setName("harden");
String s3="20180002";
scoreInformations[3].setStunumber(s3);
scoreInformations[4]=new ScoreInformation();
scoreInformations[4].setName("james");
String s4="20180004";
scoreInformations[4].setStunumber(s4);
}
static void add(){
Scanner sc = new Scanner(System.in);
String stunumber=sc.nextLine();
for(int i=0;i<5;i++){
scoreInformations [I] = new new ScoreInformation ();
chushihua ();
IF (scoreInformations [I] .getStunumber () the equals (stunumber).) {
System.out.println ( "Student Name:" + scoreInformations [i] .getName ( ));
System.out.println ( "student number:" + scoreInformations [i] .getStunumber ());
System.out.println ( "Please enter the higher mathematics achievement:");
Double mathematicsscore = sc.nextDouble () ;
System.out.println ( "Please enter the English achievement");
Double englishiscore = sc.nextDouble ();
System.out.println ( "Please enter the computer network performance");
Double networkscore = sc.nextDouble ();
System. out.println ( "Please enter the database performance:");
databasescore = sc.nextDouble Double ();
System.out.println ( "Please enter the Software Engineering results:");
Double softwarescore = sc.nextDouble ();
System.out.println ( "The student achievement has been entered you submitted (Y / N) ");
Scanner Scanner SC1 new new = (the System.in);
String panduan sc1.nextLine = ();
String = Y" the Y ";
IF (panduan.equals (Y)) {
System.out.println (" successfully entered ");!
}
the else {
int I1 = 0;
Double D1 = I1;
scoreInformations [I] .setDatabasescore (D1);
scoreInformations [I] .setEnglishiscore (D1);
scoreInformations[i].setMathematicsscore(d1);
scoreInformations[i].setNetworkscore(d1);
scoreInformations[i].setSoftwarescore(d1);
caidan2();
}
}
else{
System.out.println("查无此人");
}
break;
}

}
static void updata(){
Scanner sc2=new Scanner(System.in);
String stunumber2=sc2.nextLine();
for (int i=0;i<5;i++){
scoreInformations[i]=new ScoreInformation();
chushihua();
IF (scoreInformations [I] .getStunumber (). the equals (stunumber2)) {
System.out.println ( "************************************************************ ********************************* ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute students school management system version 2019 ");
System.out.println (" student test scores modification interface ");
System.out.println (" ******************** *************************************** ");
System.out.println (" student student ID: "+ scoreInformations [i] .getStunumber ());
System.out.println (" student name: "+ scoreInformations [i] .getName ());
System.out.println (" 1, higher mathematics achievement: "+ scoreInformations [i] .getMathematicsscore ( ));
System.out.println ( "2, English results:" + scoreInformations [I] .getEnglishiscore ());
System.out.println ( ". 3, results database:" + scoreInformations [I] .getDatabasescore ());
the System. out.println ( "4, software engineering results:" + scoreInformations [I] .getSoftwarescore ());
System.out.println ( ". 5, network performance:" + scoreInformations [I] .getNetworkscore ());
}
the else {
System.out.println ( "! no such person");
}
}
caidan4 ();
Integer xuanze sc2.nextInt = ();
Switch (xuanze) {
Case. 1:
}




}
static void quite () {
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: Machuan ");
System.out.println (" *********************************** ********************************************************** ");

}

}

Guess you like

Origin www.cnblogs.com/mac-13/p/11516703.html