Student Management System 2019 Edition

package student achievement management system;


//20183594 申澳宇
public class ScoreInformation{
private String stunumber;
private String name;
private double mathematicsscore;
private double englishiscore;
private double networkscore;
private double databasescore;
private double softwarescore;


public String getStunumber(){
return stunumber;
}
public String getName(){

return name;

}
public double getMathematicsscore(){
return mathematicsscore;
}
public double getEnglishiscore(){
return englishiscore;
}
public double getNetworkscore(){
return networkscore;
}
public double getDatabasescore(){
return databasescore;
}
public double getSoftwarescore(){
return softwarescore;
}
public void setStunumber(String A){
this.stunumber = A;
}
public void setName(String A){
this.name = A;
}
public void setMathematicsscore(double A){
this.mathematicsscore = A;
}
public void setEnglishiscore(double A){
this.englishiscore = A;
}
public void setNetworkscore(double A){
this.networkscore = A;
}
public void setDatabasescore(double A){
this.databasescore = A;
}
public void setSoftwarescore(double A){
this.softwarescore = A;
}
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;
}
}

package 学生成绩管理系统;
import java.util.Scanner;
import 学生成绩管理系统.ScoreInformation;
public class ScoreManagement {
public static void main(String[] args) {
Scanner A = new Scanner(System.in);
ScoreInformation[] stu = new ScoreInformation[5];
stu[0] = new ScoreInformation("19991021", "Albert",1,1,1,1,1);
stu[1] = new ScoreInformation("19991022", "Jack",2,2,2,2,2);
stu[2] = new ScoreInformation("19991023", "Ternura",3,3,3,3,3);
stu[3] = new ScoreInformation("19991024", "Akihi",4,4,4,4,4);
stu[4] = new ScoreInformation("19991025", "Robot",5,5,5,5,5);
display(stu);
}
private static void display(ScoreInformation[] stu) {
Scanner A = new Scanner(System.in);
System.out.println ( "****************************************");
System.out.println ( "software Engineering, Shijiazhuang Railway Institute");
System.out.println ( "class student management system 2019 Edition");
System.out.println ( "********** *********************************************************** ");
System.out.println (" teacher student achievement 1. entry ");
System .out.println ( "2. modify student test scores");
System.out.println ( "3. calculate student achievement Grade point");
System.out.println ( "4. quit school management system");
system. out.println ( "*****************************************");
int A.nextInt = A ();
Switch (A) {
Case. 1: Record (STU); BREAK; // input
case 2: change (stu); break; // Review
case 3: calculate (stu); break; / / calculated
case 4: finish (); break ; // exit
default:
{
System.out.println ( "option does not exist");
the display (STU);
BREAK;
}
}
}
Private static void Record (ScoreInformation [] STU) {// Input
Scanner Scanner A new new = (the System.in);
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: ");
System.out.println (" ****************** ***************************************** ");
Scanner Scanner new new B = ( the System.in);
String Number = B.nextLine ();
int In Flag = 0, I;
for (I = 0; I <. 5;i++)
{
IF (number.equals (STU [I] .getStunumber ())) {
System.out.println ( "************************************************************ ******************* ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println ( "student number:" + STU [i] .getStunumber ());
System.out.println ( "student name:" + STU [i] .getName ());
System.out.println ( "Please enter the higher mathematics results: ");
System.out.println (" ************************************** *************************************** ");
Double B.nextDouble Math = ();
System.out.println (STU [I] .getName () +" a high number of results are: "Math +);
the System. out.print ( "Please enter the English results:");
Double Dictionary Dictionary English B.nextDouble = ();
System.out.println (STU [I] .getName () + "score in English:" + Dictionary Dictionary English);
the System. out.print ( "Please enter the computer network performance:");
double network = B.nextDouble();
System.out.println (stu [i] .getName ( ) + " computer network performance are:" + Network);
of System.out.print ( "Please enter the database results:");
Double Data = B.nextDouble () ;
System.out.println (STU [I] .getName () + "database of results are:" Data +);
of System.out.print ( "Please enter the software results:");
Double Soft B.nextDouble = ( );
System.out.println ( "***************************************** *** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student management system version 2019 ");
System.out.println (" student name: "+ stu [i] .getName ());
System.out.println ( "higher mathematics achievement:" the math +);
System.out.println ( "university English scores:" + english);
System.out.println ( "computer network performance:" + network);
System. out.println ( "database performance:" the Data +);
System.out.println ( "Software engineering achievement: "Soft +);
System.out.print (" student achievement has been the entry is complete, whether to submit (Y / N) ");
System.out.println ( "******************************************* *** ");
. IF (B.next () the equals (" the Y "))
{
STU [I] .setEnglishiscore (Dictionary Dictionary English);
STU [I] .setMathematicsscore (Math);
STU [I] .setDatabasescore (Data );
STU [I] .setNetworkscore (Network);
STU [I] .setSoftwarescore (Soft);
the display (STU);
} the else
{
System.out.println ( "return entry page");
Record (STU);
}
In Flag = 1;
}
}
// If not the student information, prompted to re-enter.
IF (In Flag == 0)
{
System.out.println ( "the student number does not exist, please re-enter");
Record (STU);
}
}
Private static void Change (ScoreInformation [] STU) {// Review
A new new = Scanner Scanner (the System.in);
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 (" Please enter the student number: " );
System.out.println ( "***************************************** ************************************************** ");
Scanner Scanner new new B = (the System.in);
String Number = B.nextLine ();
int In Flag = 0;
for (int I 0 =; I <. 5; I ++)
{
. IF (STU [I] .getStunumber () the equals (Number))
{
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:" + 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: "+ STU [i] .getSoftwarescore ());
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 results: "STU + [I] .getSoftwarescore ());
System.out.println ("**************************************************");
int select = A.nextInt();
double chang=0;
Switch (the SELECT)
{
Case 1:
System.out.println ( "student test scores input interface");
System.out.println ( "******************** ************************************************************ ");
System.out.println (" student number: "+ STU [I] .getStunumber ());
the System.out .println ( "student name:" + STU [i] .getName ());
System.out.print ( "Please enter the number of high-performance modified:");
Chang = A.nextDouble ();
System.out. println ( "*********************************************** ********* ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student management system ");
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:" + chang);
System.out.println ( "2, university English scores:" + STU [i] .getSoftwarescore ());
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 achievement:" + STU [i] .getSoftwarescore ());
System .out.println ( "******************************************** ************ ");
System.out.print (" student achievement has been the modification is completed, whether or not to submit (the Y-/ N) ");
System.out.println (" **** ************************************************** **** ");
. IF (A.next () the equals (" the Y ")) {
STU [I] .setMathematicsscore (Chang);
the display (STU);
}
the else {
Change (STU);
}
BREAK;
Case 2:
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. print ( "Please enter university English scores revised:");
Chang = A.nextDouble ();
System.out.println ( "******************** ************************************ ");
System.out.println (" software Shijiazhuang Railway Institute Engineering student management system ");
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 mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out. println ( "2, university English scores: "+ chang);
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 achievement:" + STU [i] .getSoftwarescore ());
System.out.println ( "******************* ************************************* ");
System.out.println (" the student achievement modified completed, whether to submit (the Y / N) ");
System.out.println (" **************************************************************** **************************************************************** ");
. IF (A.next () the equals (" the Y ")) {
STU [ I] .setSoftwarescore (Chang);
the display (STU);
}
the else {
Change (STU);
}
BREAK;
Case. 3:
System.out.println ( "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.print ( "Please enter the modified computer network performance:");
Chang = A.nextDouble ();
System.out.println ( "********************* *********************************** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering Department of student management system ");
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 mathematics achievement:" + STU [i] .getMathematicsscore ());
System.out.println ( "2, university English scores:" + STU [i] .getSoftwarescore ());
System.out.println ( "3, computer network performance: "+ chang);
System.out.println ( "4, database performance:" + STU [i] .getDatabasescore ());
System.out.println ( "5, software engineering achievement:" + STU [i] .getSoftwarescore ());
System .out.println ( "******************************************** ************ ");
System.out.print (" student achievement has been the modification is completed, whether or not to submit (the Y-/ N) ");
System.out.println (" **** ************************************************** **** ");
. IF (A.next () the equals (" the Y ")) {
STU [I] .setNetworkscore (Chang);
the display (STU);
}
the else {
Change (STU);
}
BREAK;
Case 4:
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.print ( "Please enter the database performance amended:");
Chang = A.nextDouble ();
System. out.println ( "********************************************* *********** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student management system ");
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] .getSoftwarescore ());
System.out. println ( "3, a computer network performance:" STU + [I] .getNetworkscore ());
System.out.println ( "4, database performance: "+ chang);
System.out.println ( "5, software engineering achievement:" + STU [i] .getSoftwarescore ());
System.out.println ( "****************** ************************************** ");
System.out.print (" the student what has been the modification is completed, whether or not to submit (the Y-/ N) ");
System.out.println (" **************************** ************************************************************ ");
. IF (A.next () the equals (" the Y ")) {
STU [I] .setDatabasescore (Chang);
the display (STU);
}
the else {
Change (STU);
}
BREAK;
Case. 5:
System.out.println ( "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.print ( "Please enter the modified software engineering achievement:");
= A.nextDouble Chang ();
System.out.println ( "*********************************** ********************* ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student management system ");
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] .getSoftwarescore ());
System.out.println ( ". 3, the computer network performance:" STU + [I] .getNetworkscore ());
System.out.println ( ". 4, the database results:" + stu [i]. getDatabasescore ());
System.out.println ( "5, software engineering achievement:" + Chang);
System.out.println("********************************************************");
System.out.print ( "student achievement has been the modification is completed, whether or not to submit (the Y-/ N)");
System.out.println ( "******************* *************************************** ");
IF (A.next (). the equals ( "the Y")) {
STU [I] .setSoftwarescore (Chang);
the display (STU);
}
the else {
Change (STU);
}
BREAK;
default:
System.out.println ( "Please enter the correct information");
Change (STU);
BREAK;
}
In Flag =. 1;
}
}
IF (In Flag == 0)
{
System.out.println ( "student number input error, please re-enter student number");
Change (STU);
}
}
Private static void calculate (ScoreInformation [] stu ) {// calculate GPA
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: ");
System.out.println (" ******************* **************************************** ");
Scanner Scanner new new B = (the System .in);
String Number = B.nextLine ();
System.out.println ( "************************************************************ **************************************************************** ");
System.out.println (" software Engineering, Shijiazhuang Railway Institute student management system 2019 Version ");
System.out.println (" student test scores to calculate grade point interface ");
System.out.println (" ********************** ************************************* ");
System.out.println ("Student number: "+ number);
System.out.println("***********************************************************");
int i;
double mathematics=0,englishi=0,network=0,database=0,software=0;
for(i=0;i<5;i++)
if (stu[i].getStunumber().equals(number))
{
System.out.println(" 学生姓名:"+stu[i].getName());
{
System.out.println(" 学生姓名:"+stu[i].getName());
if(stu[i].getMathematicsscore()>=90) mathematics=4.0;
if(stu[i].getMathematicsscore()>=85&&stu[i].getMathematicsscore()<=89.9) mathematics=3.7;
if(stu[i].getMathematicsscore()>=82&&stu[i].getMathematicsscore()<=84.9) mathematics=3.3;
if(stu[i].getMathematicsscore()>=78&&stu[i].getMathematicsscore()<=81.9) mathematics=2.7;
if(stu[i].getMathematicsscore()>=75&&stu[i].getMathematicsscore()<=77.9) mathematics=2.3;
if(stu[i].getMathematicsscore()>=72&&stu[i].getMathematicsscore()<=74.9) mathematics=2.0;
if(stu[i].getMathematicsscore()>=68&&stu[i].getMathematicsscore()<=71.9) mathematics=1.7;
if(stu[i].getMathematicsscore()>=66&&stu[i].getMathematicsscore()<=67.9) mathematics=1.5;
if(stu[i].getMathematicsscore()>=64&&stu[i].getMathematicsscore()<=65.9) mathematics=1.0;
if(stu[i].getMathematicsscore()<60) mathematics=0;
System.out.println(" 1.高等数学成绩绩点:"+mathematics);
if(stu[i].getEnglishiscore()>=90) englishi=4.0;
if(stu[i].getEnglishiscore()>=85&&stu[i].getEnglishiscore()<=89.9) englishi=3.7;
if(stu[i].getEnglishiscore()>=82&&stu[i].getEnglishiscore()<=84.9) englishi=3.3;
if(stu[i].getEnglishiscore()>=78&&stu[i].getEnglishiscore()<=81.9) englishi=2.7;
if(stu[i].getEnglishiscore()>=75&&stu[i].getEnglishiscore()<=77.9) englishi=2.3;
if(stu[i].getEnglishiscore()>=72&&stu[i].getEnglishiscore()<=74.9) englishi=2.0;
if(stu[i].getEnglishiscore()>=68&&stu[i].getEnglishiscore()<=71.9) englishi=1.7;
if(stu[i].getEnglishiscore()>=66&&stu[i].getEnglishiscore()<=67.9) englishi=1.5;
if(stu[i].getEnglishiscore()>=64&&stu[i].getEnglishiscore()<=65.9) englishi=1.0;
if(stu[i].getEnglishiscore()<60) englishi=0;
System.out.println(" 2.大学英语成绩绩点:"+englishi);
if(stu[i].getNetworkscore()>=90) network=4.0;
if(stu[i].getNetworkscore()>=85&&stu[i].getNetworkscore()<=89.9) network=3.7;
if(stu[i].getNetworkscore()>=82&&stu[i].getNetworkscore()<=84.9) network=3.3;
if(stu[i].getNetworkscore()>=78&&stu[i].getNetworkscore()<=81.9) network=2.7;
if(stu[i].getNetworkscore()>=75&&stu[i].getNetworkscore()<=77.9) network=2.3;
if(stu[i].getNetworkscore()>=72&&stu[i].getNetworkscore()<=74.9) network=2.0;
if(stu[i].getNetworkscore()>=68&&stu[i].getNetworkscore()<=71.9) network=1.7;
if(stu[i].getNetworkscore()>=66&&stu[i].getNetworkscore()<=67.9) network=1.5;
if(stu[i].getNetworkscore()>=64&&stu[i].getNetworkscore()<=65.9) network=1.0;
if(stu[i].getNetworkscore () <60) = 0 Network;
System.out.println ( "GPA 3. Computer Network Results:" + network);
if(stu[i].getDatabasescore()>=90) database=4.0;
if(stu[i].getDatabasescore()>=85&&stu[i].getDatabasescore()<=89.9) database=3.7;
if(stu[i].getDatabasescore()>=82&&stu[i].getDatabasescore()<=84.9) database=3.3;
if(stu[i].getDatabasescore()>=78&&stu[i].getDatabasescore()<=81.9) database=2.7;
if(stu[i].getDatabasescore()>=75&&stu[i].getDatabasescore()<=77.9) database=2.3;
if(stu[i].getDatabasescore()>=72&&stu[i].getDatabasescore()<=74.9) database=2.0;
if(stu[i].getDatabasescore()>=68&&stu[i].getDatabasescore()<=71.9) database=1.7;
if(stu[i].getDatabasescore()>=66&&stu[i].getDatabasescore()<=67.9) database=1.5;
if(stu[i].getDatabasescore()>=64&&stu[i].getDatabasescore()<=65.9) database=1.0;
if(stu[i].getDatabasescore()<60) database=0;
System.out.println(" 4.数据库成绩绩点:"+database);
if(stu[i].getSoftwarescore()>=90) software=4.0;
if(stu[i].getSoftwarescore()>=85&&stu[i].getSoftwarescore()<=89.9) software=3.7;
if(stu[i].getSoftwarescore()>=82&&stu[i].getSoftwarescore()<=84.9) software=3.3;
if(stu[i].getSoftwarescore()>=78&&stu[i].getSoftwarescore()<=81.9) software=2.7;
if(stu[i].getSoftwarescore()>=75&&stu[i].getSoftwarescore()<=77.9) software=2.3;
if(stu[i].getSoftwarescore()>=72&&stu[i].getSoftwarescore()<=74.9) software=2.0;
if(stu[i].getSoftwarescore()>=68&&stu[i].getSoftwarescore()<=71.9) software=1.7;
if(stu[i].getSoftwarescore()>=66&&stu[i].getSoftwarescore()<=67.9) software=1.5;
IF (STU [I] .getSoftwarescore ()> = 64 && STU [I] .getSoftwarescore () <= 65.9) = 1.0 Software;
IF (STU [I] .getSoftwarescore () <60) Software = 0;
System.out.println ( "The software Engineering GPA results:" software +);
Double Average = 0; Average = (THEORY englishi * *. 4. 3 + + + Network Database. 4 * * * software. 3 + 2) / 16;
String String Result = .format ( "% 2F.", average);
System.out.println ( "your grade point average is:" + the Result);
IF (average> = 2)
System.out.println ( "message: you the Grade point has reached graduation requirements ");!
the else
System.out.println (" message:! your Grade point does not meet the requirements for graduation ");
System.out.println (" whether to return the main interface :( the Y / N) ");
System.out.println (" ************************************ ** ");
. IF (B.next () the equals (" the Y ")) {
the display (STU);
}
}
}
}
static void finish () {// exit
System.out.println ( "********************************** ********** ");
System.out.println (" Shijiazhuang Railway Institute of software Engineering student management system version 2019 ");
System.out.println (" producer: Shen Yu O ") ;
System.out.println ( "****************************************** ** ");
}

}

 

 

 

 

 

 

 

 

 

 

 Define ScoreInformation classes, including seven private variables (stunumber, name, mathematicsscore, englishiscore, networkscore, databasescore, softwarescore).

Five students and then deposit information, reuse and switch statements if realization: entry test scores, student test scores modify, calculate student achievement Grade Point Average, quit school management system functions.

This little test I found myself a lot of shortcomings, many do not know the basic syntax of Java, later to find time to replenish themselves.













 

Guess you like

Origin www.cnblogs.com/shenaoyu/p/11514828.html
Recommended