1.ソースのアイデア:入力された結果、GPAスコア算出修飾は、スイッチを使用して4つの機能、及びメイン関数として記述されているシステムを終了し、ループサイクルながらコールを完了します。
ソースコード2:
パッケージStudenの;
//定义ScoreInformation类
クラスScoreInformation {
プライベート文字列stunumber。
プライベート文字列名;
プライベートダブルmathematicsscore。
プライベートダブルenglishiscore。
プライベートダブルnetworkscore。
プライベートダブルdatabasescore。
プライベートダブルsoftwarescore。
公共ボイドsetStunumber(文字列stunumber){
this.stunumber = stunumber。
}
公共ボイドのsetName(文字列名){
this.name =名。
}
公共ボイドsetMathematicsscore(ダブルmathematicsscore){
this.mathematicsscore = mathematicsscore。
}
公共ボイドsetEnglishiscore(ダブルenglishiscore){
this.englishiscore = englishiscore。
}
公共ボイドsetNetworkscore(ダブルnetworkscore){
this.networkscore = networkscore。
}
公共ボイドsetDatabasescore(ダブルdatabasescore){
this.databasescore = databasescore。
}
公共ボイドsetSoftwarescore(ダブルsoftwarescore){
this.softwarescore = softwarescore。
}
パブリック文字列getStunumber(){
戻りstunumber。
}
パブリック文字列のgetName(){
戻り名。
}
公共ダブルgetMathematicsscore(){
戻りmathematicsscore。
}
公共ダブルgetEnglishiscore(){
戻りenglishiscore。
}
公共ダブルgetNetworkscore(){
戻りnetworkscore。
}
公共ダブルgetDatabasescore(){
databasescoreを返します。
}
公共ダブルgetSoftwarescore(){
softwarescore返します。
}
}
クラスScoreInformation {
プライベート文字列stunumber。
プライベート文字列名;
プライベートダブルmathematicsscore。
プライベートダブルenglishiscore。
プライベートダブルnetworkscore。
プライベートダブルdatabasescore。
プライベートダブルsoftwarescore。
公共ボイドsetStunumber(文字列stunumber){
this.stunumber = stunumber。
}
公共ボイドのsetName(文字列名){
this.name =名。
}
公共ボイドsetMathematicsscore(ダブルmathematicsscore){
this.mathematicsscore = mathematicsscore。
}
公共ボイドsetEnglishiscore(ダブルenglishiscore){
this.englishiscore = englishiscore。
}
公共ボイドsetNetworkscore(ダブルnetworkscore){
this.networkscore = networkscore。
}
公共ボイドsetDatabasescore(ダブルdatabasescore){
this.databasescore = databasescore。
}
公共ボイドsetSoftwarescore(ダブルsoftwarescore){
this.softwarescore = softwarescore。
}
パブリック文字列getStunumber(){
戻りstunumber。
}
パブリック文字列のgetName(){
戻り名。
}
公共ダブルgetMathematicsscore(){
戻りmathematicsscore。
}
公共ダブルgetEnglishiscore(){
戻りenglishiscore。
}
公共ダブルgetNetworkscore(){
戻りnetworkscore。
}
公共ダブルgetDatabasescore(){
databasescoreを返します。
}
公共ダブルgetSoftwarescore(){
softwarescore返します。
}
}
主な方法:
パッケージStudenの;
輸入java.utilの。*;
輸入java.text.DecimalFormatの。
パブリッククラスメイン{
静的ScoreInformation [] ScoreInformation =新しいScoreInformation [5]。
輸入java.utilの。*;
輸入java.text.DecimalFormatの。
パブリッククラスメイン{
静的ScoreInformation [] ScoreInformation =新しいScoreInformation [5]。
静的スキャナスキャナ=新しいスキャナ(System.in)。
静的int型NUM;
パブリック静的無効メイン(文字列[] args){
// TODO自動生成方法スタブ
//退出学籍管理系统
ため(INT i = 0; iは<5; I ++)
ScoreInformation [I] =新しいScoreInformation()。
ScoreInformation [0] .setStunumber( "20183580")。
ScoreInformation [0] .setName( "liuhexin")。
ScoreInformation [1] .setStunumber( "20183581")。
ScoreInformation [1] .setName( "A")。
ScoreInformation [2] .setStunumber( "20183582")。
ScoreInformation [2] .setName( "B")。
ScoreInformation [3] .setStunumber( "20183583")。
ScoreInformation [3] .setName( "C")。
[4] ScoreInformation .setStunumber( "20183584");
ScoreInformation .setName( "D"); [4]
(真の)一方{
ディスプレイ();
INT = N-scanner.nextInt();
スイッチ(N-){
ケース1:。追加();破る; //得点-録画
ケース2:変更()を;破る ; // 成果が変更
ケース3:JDdisplay();破る ; // 達成グレード・ポイント・
ケース4:終了();破る ; // 学校を辞め管理
}
}
}
静的ボイドディスプレイ(){//メインインターフェース
するSystem.out.println(「**************************** ******************************* ");
System.out.printlnは("ソフトウェア工学「石家荘鉄道研究所)。
System.out.println(「学生管理システム2019年版」)。
System.out.println(「******************************************* **************** ");
のSystem.out.println(" 1、学生のテストの点数エントリ");
のSystem.out.println(" 2、生徒のテストの点数の変更「) ;
System.out.printlnは( "3、生徒の成績グレードポイントを計算");
System.out.printlnは( "4、終了学校管理システム");
System.out.printlnは(「********* ************************************************** ");
}
静的ボイド追加(){//スコアエントリ
のint NUM = 0;
のSystem.out.println(" ************************************************************ ***********************************「);
System.out.printlnは(」石家荘鉄道研究所のソフトウェア・エンジニアリング学生管理システム2019年版の学科「);
System.out.println( "生徒のテストの点数エントリ");
System.out.printlnは(「**************************************************************** *********************************************************** ");
System.out.print("学生番号を入力してください:「); / /学生ID分析
ストリング= n-Scanner.next();
フラグ= 0のintを、
ため(;私は<5; I = 0 int型。私は++)
{
IF(n.equals(ScoreInformation [I] .getStunumber())){
フラグに。1 =;
NUM = I;
System.out.printlnは(「************************************ ***********************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
システム。 out.printlnを(「生徒のテストの点数エントリ」);
System.out.println(「******************************************* **************** ");
のSystem.out.println("生徒番号: "+ ScoreInformation [NUM] .getStunumber());
のSystem.out.println("生徒名前: "+ ScoreInformation [NUM] .getName());
System.out.print("高い数学の成績を入力してください:「);
ScoreInformation [NUM] .setMathematicsscore(scanner.nextDouble());
System.out.printlnは( 「************************************************* ********* ");
のSystem.out.println(" ******************************* ****************************「);
System.out.printlnは(」ソフトウェア・エンジニアリング、石家荘鉄道研究所の学生管理システムのバージョン2019 「);
System.out.println( "生徒のテストの点数エントリ");
System.out.printlnは(「**************************************************************** *********************************************************** ");
System.out.printlnは("学生の数:「+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは( "学生名:" + [NUM] ScoreInformation .getName());
System.out.print( "大学英語のスコアを入力してください:");
ScoreInformation [NUM] .setEnglishiscore (scanner.nextDouble());
のSystem.out.println(「*********************************** *********************** ");
のSystem.out.println(" ***************** ******************************************「);
System.out.println(「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所」);
System.out.printlnは(「生徒のテストの点数エントリ」);
System.out.printlnは(「******* ************************************************** ** ");
System.out.printlnは("学生の数: "+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは("学生名:「+ ScoreInformation [NUM] .getName ());
System.out.print( "コンピュータネットワークのパフォーマンスを入力してください:");
ScoreInformation [NUM] .setNetworkscore(scanner.nextDouble());
System.out.printlnは(「************* ****************************「);
System.out.println(「******************************************* ****************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」学生のテストスコア-記録")
のSystem.out.println(" ************************************** ********************* ");
のSystem.out.println("生徒番号:「+ ScoreInformation [NUM] .getStunumber());
のSystem.out .println( "学生名:" + [NUM] ScoreInformation .getName());
System.out.print( "データベースのパフォーマンスを入力してください:");
ScoreInformation [NUM] .setDatabasescore(scanner.nextDouble());
System.out.println(「******************************************* *************** ");
のSystem.out.println(" ************************************************************ ********************************** ");
System.out.printlnは("ソフトウェア・エンジニアリング、石家荘鉄道研究所学生管理システムのバージョン2019 ");
のSystem.out.println("学生のテストの点数エントリ");
のSystem.out.println(" ******************** *************************************** ");
System.out.printlnは("学生学生ID: "+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは("学生名: "+ [NUM] ScoreInformation .getName());
System.out.print("入力してくださいソフトウェアエンジニアリングの結果: 「);
ScoreInformation [NUM] .setSoftwarescore(scanner.nextDouble());
のSystem.out.println(「**************************************************************** **************************************************************** ");
のSystem.out.println(" *********** ***********************************************「);
System.out.println(「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所」);
System.out.printlnは(「生徒のテストの点数エントリ」);
System.out.printlnは(「******* ************************************************** ** ");
System.out.printlnは("学生の数: "+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは("学生名:「+ ScoreInformation [NUM] .getName ());
System.out.println( "より高い数学達成:" + [NUM] ScoreInformation .getMathematicsscore());
のSystem.out.println( "英語:" + ScoreInformation [NUM] .getEnglishiscore());
のSystem.out.println ( "コンピュータネットワーク性能:" + [NUM] ScoreInformation .getNetworkscore());
のSystem.out.println( "データベースのパフォーマンス:" + ScoreInformation [NUM] .getDatabasescore());
のSystem.out.println(「ソフトウェアエンジニアリングの実績: "+ ScoreInformation [NUM] .getSoftwarescore());
のSystem.out.println("生徒の成績の終了が(Y- / Nを送信するかどうか、入力された) ");
のSystem.out.println(" ************************************************** *********「);
= scanner.nextとして文字列();
IF(as.equals( "Y")){
ディスプレイ();
}
他{
ScoreInformation [NUM] .setMathematicsscore(0)。
ScoreInformation [NUM] .setEnglishiscore(0)。
ScoreInformation [NUM] .setNetworkscore(0)。
ScoreInformation [NUM] .setDatabasescore(0)。
ScoreInformation [NUM] .setSoftwarescore(0)。
追加();
}
}
静的int型NUM;
パブリック静的無効メイン(文字列[] args){
// TODO自動生成方法スタブ
//退出学籍管理系统
ため(INT i = 0; iは<5; I ++)
ScoreInformation [I] =新しいScoreInformation()。
ScoreInformation [0] .setStunumber( "20183580")。
ScoreInformation [0] .setName( "liuhexin")。
ScoreInformation [1] .setStunumber( "20183581")。
ScoreInformation [1] .setName( "A")。
ScoreInformation [2] .setStunumber( "20183582")。
ScoreInformation [2] .setName( "B")。
ScoreInformation [3] .setStunumber( "20183583")。
ScoreInformation [3] .setName( "C")。
[4] ScoreInformation .setStunumber( "20183584");
ScoreInformation .setName( "D"); [4]
(真の)一方{
ディスプレイ();
INT = N-scanner.nextInt();
スイッチ(N-){
ケース1:。追加();破る; //得点-録画
ケース2:変更()を;破る ; // 成果が変更
ケース3:JDdisplay();破る ; // 達成グレード・ポイント・
ケース4:終了();破る ; // 学校を辞め管理
}
}
}
静的ボイドディスプレイ(){//メインインターフェース
するSystem.out.println(「**************************** ******************************* ");
System.out.printlnは("ソフトウェア工学「石家荘鉄道研究所)。
System.out.println(「学生管理システム2019年版」)。
System.out.println(「******************************************* **************** ");
のSystem.out.println(" 1、学生のテストの点数エントリ");
のSystem.out.println(" 2、生徒のテストの点数の変更「) ;
System.out.printlnは( "3、生徒の成績グレードポイントを計算");
System.out.printlnは( "4、終了学校管理システム");
System.out.printlnは(「********* ************************************************** ");
}
静的ボイド追加(){//スコアエントリ
のint NUM = 0;
のSystem.out.println(" ************************************************************ ***********************************「);
System.out.printlnは(」石家荘鉄道研究所のソフトウェア・エンジニアリング学生管理システム2019年版の学科「);
System.out.println( "生徒のテストの点数エントリ");
System.out.printlnは(「**************************************************************** *********************************************************** ");
System.out.print("学生番号を入力してください:「); / /学生ID分析
ストリング= n-Scanner.next();
フラグ= 0のintを、
ため(;私は<5; I = 0 int型。私は++)
{
IF(n.equals(ScoreInformation [I] .getStunumber())){
フラグに。1 =;
NUM = I;
System.out.printlnは(「************************************ ***********************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
システム。 out.printlnを(「生徒のテストの点数エントリ」);
System.out.println(「******************************************* **************** ");
のSystem.out.println("生徒番号: "+ ScoreInformation [NUM] .getStunumber());
のSystem.out.println("生徒名前: "+ ScoreInformation [NUM] .getName());
System.out.print("高い数学の成績を入力してください:「);
ScoreInformation [NUM] .setMathematicsscore(scanner.nextDouble());
System.out.printlnは( 「************************************************* ********* ");
のSystem.out.println(" ******************************* ****************************「);
System.out.printlnは(」ソフトウェア・エンジニアリング、石家荘鉄道研究所の学生管理システムのバージョン2019 「);
System.out.println( "生徒のテストの点数エントリ");
System.out.printlnは(「**************************************************************** *********************************************************** ");
System.out.printlnは("学生の数:「+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは( "学生名:" + [NUM] ScoreInformation .getName());
System.out.print( "大学英語のスコアを入力してください:");
ScoreInformation [NUM] .setEnglishiscore (scanner.nextDouble());
のSystem.out.println(「*********************************** *********************** ");
のSystem.out.println(" ***************** ******************************************「);
System.out.println(「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所」);
System.out.printlnは(「生徒のテストの点数エントリ」);
System.out.printlnは(「******* ************************************************** ** ");
System.out.printlnは("学生の数: "+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは("学生名:「+ ScoreInformation [NUM] .getName ());
System.out.print( "コンピュータネットワークのパフォーマンスを入力してください:");
ScoreInformation [NUM] .setNetworkscore(scanner.nextDouble());
System.out.printlnは(「************* ****************************「);
System.out.println(「******************************************* ****************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」学生のテストスコア-記録")
のSystem.out.println(" ************************************** ********************* ");
のSystem.out.println("生徒番号:「+ ScoreInformation [NUM] .getStunumber());
のSystem.out .println( "学生名:" + [NUM] ScoreInformation .getName());
System.out.print( "データベースのパフォーマンスを入力してください:");
ScoreInformation [NUM] .setDatabasescore(scanner.nextDouble());
System.out.println(「******************************************* *************** ");
のSystem.out.println(" ************************************************************ ********************************** ");
System.out.printlnは("ソフトウェア・エンジニアリング、石家荘鉄道研究所学生管理システムのバージョン2019 ");
のSystem.out.println("学生のテストの点数エントリ");
のSystem.out.println(" ******************** *************************************** ");
System.out.printlnは("学生学生ID: "+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは("学生名: "+ [NUM] ScoreInformation .getName());
System.out.print("入力してくださいソフトウェアエンジニアリングの結果: 「);
ScoreInformation [NUM] .setSoftwarescore(scanner.nextDouble());
のSystem.out.println(「**************************************************************** **************************************************************** ");
のSystem.out.println(" *********** ***********************************************「);
System.out.println(「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所」);
System.out.printlnは(「生徒のテストの点数エントリ」);
System.out.printlnは(「******* ************************************************** ** ");
System.out.printlnは("学生の数: "+ ScoreInformation [NUM] .getStunumber());
System.out.printlnは("学生名:「+ ScoreInformation [NUM] .getName ());
System.out.println( "より高い数学達成:" + [NUM] ScoreInformation .getMathematicsscore());
のSystem.out.println( "英語:" + ScoreInformation [NUM] .getEnglishiscore());
のSystem.out.println ( "コンピュータネットワーク性能:" + [NUM] ScoreInformation .getNetworkscore());
のSystem.out.println( "データベースのパフォーマンス:" + ScoreInformation [NUM] .getDatabasescore());
のSystem.out.println(「ソフトウェアエンジニアリングの実績: "+ ScoreInformation [NUM] .getSoftwarescore());
のSystem.out.println("生徒の成績の終了が(Y- / Nを送信するかどうか、入力された) ");
のSystem.out.println(" ************************************************** *********「);
= scanner.nextとして文字列();
IF(as.equals( "Y")){
ディスプレイ();
}
他{
ScoreInformation [NUM] .setMathematicsscore(0)。
ScoreInformation [NUM] .setEnglishiscore(0)。
ScoreInformation [NUM] .setNetworkscore(0)。
ScoreInformation [NUM] .setDatabasescore(0)。
ScoreInformation [NUM] .setSoftwarescore(0)。
追加();
}
}
}
IF(フラグに== 0){
するSystem.out.printlnは( "サイエンスユーザ番号が存在しない")、
追加();
}
}
静的ボイド変更(){//スコア修飾
するSystem.out.println(「*** ************************************************** ******「);
System.out.printlnは(」ソフトウェア工学の学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」学生のテストの点数変更インタフェース「);
のSystem.out。 println(「*********************************************** ************ ");
System.out.print("学生番号を入力してください:「);
;文字列n-Scanner.next()=
int型フラグ= 0;
System.out.println(「******************************************* *********************************************************「);
int型NUM;
Iは<5;のための(I = 0 int型。私は++){
IF(n.equals(ScoreInformation [I] .getStunumber() )){
NUM = I;
フラグに= 1;
のSystem.out.println(「******************************** **************************「);
System.out.printlnは(」ソフトウェア工学の学生管理システム2019年版「の石家荘鉄道研究所) ;
System.out.printlnは( "生徒のテストの点数エントリ");
System.out.printlnは(「**************************** ******************************* ");
System.out.printlnは("学生の数:「+ ScoreInformation [NUM ] .getStunumber())。
System.out.println( "生徒名:" + [NUM] ScoreInformation .getName());
のSystem.out.println( "1、より高い数学達成:" + ScoreInformation [NUM] .getMathematicsscore());
のSystem.out .println( "2、英語:" + ScoreInformation [NUM] .getEnglishiscore());
のSystem.out.println( "3、コンピュータネットワークのパフォーマンス:" + ScoreInformation [NUM] .getNetworkscore());
のSystem.out。 println( "4、データベース性能:" + [NUM] ScoreInformation .getDatabasescore());
のSystem.out.println( "5、ソフトウェアエンジニアリングの達成:" + ScoreInformation [NUM] .getSoftwarescore());
のSystem.out.println ( ' ************************************************** *********「);
System.out.print( "あなたは結果を変更したい番号を入力してください:");
int型、B = scanner.nextInt();
System.out.printlnは(「***************** *****************************************「);
System.out.printlnは( 「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所」);
System.out.printlnは(「学生のテストの点数入力インタフェース」);
System.out.printlnは(「************ ***********************************************「);
System.out.println( "生徒番号:" + ScoreInformation [NUM] .getStunumber());
のSystem.out.println( "生徒名:" + ScoreInformation [NUM] .getName());
スイッチ(B){
ケース1:System.out.print( " 改訂高い数学の成績を入力してください:「);
ScoreInformation [NUM] .setMathematicsscore(scanner.nextDouble()); BREAK;
ケース2:System.out.print( "大学英語スコアは改訂を入力してください:");
ScoreInformation [NUM] .setEnglishiscore(scanner.nextDouble() ); BREAK;
ケース3:System.out.printの( "コンピュータネットワークは、スコアを変更し入力してください");
ScoreInformation [NUM] .setNetworkscore(scanner.nextDouble()); BREAK;
ケース4:のSystem.out.print。 ( "改正データベースのパフォーマンスを入力してください:");
ScoreInformation [NUM] .setDatabasescore(scanner.nextDouble()); BREAK;
事例5:System.out.print( "修正ソフトウェア工学の成果を入力してください:") ;
ScoreInformation [NUM] .setSoftwarescore(scanner.nextDouble()); BREAK;
}
System.out.println(「******************************************* ***************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」生徒のテストの点数エントリ");
System.out.printlnは(" *************************************** ******************** ");
のSystem.out.println("生徒番号:「+ ScoreInformation [NUM] .getStunumber());
のSystem.out。 println( "学生名:" + ScoreInformation [NUM] .getName());
System.out.printlnは( "1、高い数学の成績:" + ScoreInformation [NUM] .getMathematicsscore());
System.out.printlnは( " 2、英語:「+ ScoreInformation [NUM] .getEnglishiscore())。
System.out.println( "3、コンピュータネットワークのパフォーマンス:" + [NUM] ScoreInformation .getNetworkscore());
のSystem.out.println( "4、データベースの結果:" + ScoreInformation [NUM] .getDatabasescore());
システム.out.println( "5、ソフトウェア工学の成果:" + ScoreInformation [NUM] .getSoftwarescore());
System.out.printlnは( "生徒の成績は、変更は(Y- / N)を提出するかどうかを、完成されてきた");
システム。 out.printlnを(「********************************************* ************** ");
文字列Scanner.next CS =();
IF(cs.equals(" Y「)){
ディスプレイ();
}
他{
変更()。
}
}
}
場合(フラグ== 0){
System.out.println( "用户学号不存在");
変化する();
}
}
静的ダブルJD(ダブルスコア){//绩点计算
ダブルJD = 0。
IF(スコア> = 90)JD = 4.0。
IF(スコア> = 85 &&スコア<= 89.9)JD = 3.7。
IF(スコア> = 82 &&スコア<= 84.9)JD = 3.3。
IF(スコア> = 78 &&スコア<= 81.9)JD = 3.0。
IF(スコア> = 75 &&スコア<= 77.9)JD = 2.7。
IF(スコア> = 72 &&スコア<= 74.9)JD = 2.3。
IF(スコア> = 68 &&スコア<= 71.9)JD = 2.0。
IF(スコア> = 66 &&スコア<= 67.9)JD = 1.7。
IF(スコア> = 64 &&スコア<= 65.9)JD = 1.5。
もし(スコア> = 60 &&スコア<= 63。 9)JD = 1.0。
IF(スコア<60)JD = 0。
JDを返します。
}
静的な無効JDdisplay(){//出力GPA
するSystem.out.println(「******************************** ***************************「);
System.out.printlnは(」ソフトウェア工学の学生管理システムの石家荘鉄道研究所2019年版」 );
のSystem.out.println( "学生のテストの点数等級ポイントインタフェースを計算する")
するSystem.out.println(「************************ ***********************************「);
System.out.printは(」学生番号を入力してください: ");
文字列= n-Scanner.next();
のSystem.out.println(" ************************************************************ ****************************************************************「);
のため(I = 0 int型、Iは<5; Iは++){
N-(IF。等号(ScoreInformation [I] .getStunumber())){
ダブルJD M =(ScoreInformation [I]。 getMathematicsscore())。
E = JDダブル(ScoreInformation [I] .getEnglishiscore());
ダブルN = JD(ScoreInformation [I] .getNetworkscore());
ダブルD = JD(ScoreInformation [I] .getDatabasescore());
ダブルS = JD( ScoreInformation [I] .getSoftwarescore());
ダブル平均=(M + E * 4. 3. 4 + N * + D * S * 3 + 2)/ 16;
てDecimalFormatてDecimalFormat新しい新しいDF =( "#0.00");
システム.out.println(「******************************************** ***************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」生徒のテストの点数GPA計算");
System.out.printlnは(" ************************************ ************************************************************「);
System.out.println( "学生の数:" + ScoreInformation [NUM] .getStunumber());
System.out.printlnは( "学生名:" + [NUM] ScoreInformation .getName());
System.out.printlnは( "1、グレードポイントの高い数学スコア:" + M)
のSystem.out.println( "2、達成グレード点における平均:" + E)
のSystem.out.println(「3、コンピュータネットワークのパフォーマンスグレード点平均: "+ N)
のSystem.out.println(" 4、GPA結果データベース: "+ D)
のSystem.out.println(" 5、ソフトウェアエンジニアリングGPA結果:「+ S)
のSystem.out.println( "あなたのGPAは:" + df.format(平均)) ;
IF(平均> 2)
System.out.println(「メッセージ:あなたはグレードポイントの卒業要件に達している!」);
他{
System.out.printlnは(「メッセージ:!あなたのグレードポイントは、卒業の要件を満たしていない」);
}
システム.out.println( "IFメインインターフェイスに戻る:(Y / N)");
のSystem.out.println(「************************************************************ ***********************************「);
文字列Scanner.next JS =();
IF(JS .equals( "Y")){
ディスプレイ();
}
他{
}
}
}
}
静的ボイド出口(){//出口システム
のSystem.out.println(「************* **********************************************「);
System.out.println(「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所の使用のためにありがとう」);
System.out.printlnは(「プロデューサー:六和新」);
System.out.printlnは(「***** ************************************************** ****「);
にSystem.exit(0);
}
}
IF(フラグに== 0){
するSystem.out.printlnは( "サイエンスユーザ番号が存在しない")、
追加();
}
}
静的ボイド変更(){//スコア修飾
するSystem.out.println(「*** ************************************************** ******「);
System.out.printlnは(」ソフトウェア工学の学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」学生のテストの点数変更インタフェース「);
のSystem.out。 println(「*********************************************** ************ ");
System.out.print("学生番号を入力してください:「);
;文字列n-Scanner.next()=
int型フラグ= 0;
System.out.println(「******************************************* *********************************************************「);
int型NUM;
Iは<5;のための(I = 0 int型。私は++){
IF(n.equals(ScoreInformation [I] .getStunumber() )){
NUM = I;
フラグに= 1;
のSystem.out.println(「******************************** **************************「);
System.out.printlnは(」ソフトウェア工学の学生管理システム2019年版「の石家荘鉄道研究所) ;
System.out.printlnは( "生徒のテストの点数エントリ");
System.out.printlnは(「**************************** ******************************* ");
System.out.printlnは("学生の数:「+ ScoreInformation [NUM ] .getStunumber())。
System.out.println( "生徒名:" + [NUM] ScoreInformation .getName());
のSystem.out.println( "1、より高い数学達成:" + ScoreInformation [NUM] .getMathematicsscore());
のSystem.out .println( "2、英語:" + ScoreInformation [NUM] .getEnglishiscore());
のSystem.out.println( "3、コンピュータネットワークのパフォーマンス:" + ScoreInformation [NUM] .getNetworkscore());
のSystem.out。 println( "4、データベース性能:" + [NUM] ScoreInformation .getDatabasescore());
のSystem.out.println( "5、ソフトウェアエンジニアリングの達成:" + ScoreInformation [NUM] .getSoftwarescore());
のSystem.out.println ( ' ************************************************** *********「);
System.out.print( "あなたは結果を変更したい番号を入力してください:");
int型、B = scanner.nextInt();
System.out.printlnは(「***************** *****************************************「);
System.out.printlnは( 「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所」);
System.out.printlnは(「学生のテストの点数入力インタフェース」);
System.out.printlnは(「************ ***********************************************「);
System.out.println( "生徒番号:" + ScoreInformation [NUM] .getStunumber());
のSystem.out.println( "生徒名:" + ScoreInformation [NUM] .getName());
スイッチ(B){
ケース1:System.out.print( " 改訂高い数学の成績を入力してください:「);
ScoreInformation [NUM] .setMathematicsscore(scanner.nextDouble()); BREAK;
ケース2:System.out.print( "大学英語スコアは改訂を入力してください:");
ScoreInformation [NUM] .setEnglishiscore(scanner.nextDouble() ); BREAK;
ケース3:System.out.printの( "コンピュータネットワークは、スコアを変更し入力してください");
ScoreInformation [NUM] .setNetworkscore(scanner.nextDouble()); BREAK;
ケース4:のSystem.out.print。 ( "改正データベースのパフォーマンスを入力してください:");
ScoreInformation [NUM] .setDatabasescore(scanner.nextDouble()); BREAK;
事例5:System.out.print( "修正ソフトウェア工学の成果を入力してください:") ;
ScoreInformation [NUM] .setSoftwarescore(scanner.nextDouble()); BREAK;
}
System.out.println(「******************************************* ***************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」生徒のテストの点数エントリ");
System.out.printlnは(" *************************************** ******************** ");
のSystem.out.println("生徒番号:「+ ScoreInformation [NUM] .getStunumber());
のSystem.out。 println( "学生名:" + ScoreInformation [NUM] .getName());
System.out.printlnは( "1、高い数学の成績:" + ScoreInformation [NUM] .getMathematicsscore());
System.out.printlnは( " 2、英語:「+ ScoreInformation [NUM] .getEnglishiscore())。
System.out.println( "3、コンピュータネットワークのパフォーマンス:" + [NUM] ScoreInformation .getNetworkscore());
のSystem.out.println( "4、データベースの結果:" + ScoreInformation [NUM] .getDatabasescore());
システム.out.println( "5、ソフトウェア工学の成果:" + ScoreInformation [NUM] .getSoftwarescore());
System.out.printlnは( "生徒の成績は、変更は(Y- / N)を提出するかどうかを、完成されてきた");
システム。 out.printlnを(「********************************************* ************** ");
文字列Scanner.next CS =();
IF(cs.equals(" Y「)){
ディスプレイ();
}
他{
変更()。
}
}
}
場合(フラグ== 0){
System.out.println( "用户学号不存在");
変化する();
}
}
静的ダブルJD(ダブルスコア){//绩点计算
ダブルJD = 0。
IF(スコア> = 90)JD = 4.0。
IF(スコア> = 85 &&スコア<= 89.9)JD = 3.7。
IF(スコア> = 82 &&スコア<= 84.9)JD = 3.3。
IF(スコア> = 78 &&スコア<= 81.9)JD = 3.0。
IF(スコア> = 75 &&スコア<= 77.9)JD = 2.7。
IF(スコア> = 72 &&スコア<= 74.9)JD = 2.3。
IF(スコア> = 68 &&スコア<= 71.9)JD = 2.0。
IF(スコア> = 66 &&スコア<= 67.9)JD = 1.7。
IF(スコア> = 64 &&スコア<= 65.9)JD = 1.5。
もし(スコア> = 60 &&スコア<= 63。 9)JD = 1.0。
IF(スコア<60)JD = 0。
JDを返します。
}
静的な無効JDdisplay(){//出力GPA
するSystem.out.println(「******************************** ***************************「);
System.out.printlnは(」ソフトウェア工学の学生管理システムの石家荘鉄道研究所2019年版」 );
のSystem.out.println( "学生のテストの点数等級ポイントインタフェースを計算する")
するSystem.out.println(「************************ ***********************************「);
System.out.printは(」学生番号を入力してください: ");
文字列= n-Scanner.next();
のSystem.out.println(" ************************************************************ ****************************************************************「);
のため(I = 0 int型、Iは<5; Iは++){
N-(IF。等号(ScoreInformation [I] .getStunumber())){
ダブルJD M =(ScoreInformation [I]。 getMathematicsscore())。
E = JDダブル(ScoreInformation [I] .getEnglishiscore());
ダブルN = JD(ScoreInformation [I] .getNetworkscore());
ダブルD = JD(ScoreInformation [I] .getDatabasescore());
ダブルS = JD( ScoreInformation [I] .getSoftwarescore());
ダブル平均=(M + E * 4. 3. 4 + N * + D * S * 3 + 2)/ 16;
てDecimalFormatてDecimalFormat新しい新しいDF =( "#0.00");
システム.out.println(「******************************************** ***************「);
System.out.printlnは(」ソフトウェアエンジニアリングの学生管理システムの石家荘鉄道研究所バージョン2019「);
System.out.printlnは(」生徒のテストの点数GPA計算");
System.out.printlnは(" ************************************ ************************************************************「);
System.out.println( "学生の数:" + ScoreInformation [NUM] .getStunumber());
System.out.printlnは( "学生名:" + [NUM] ScoreInformation .getName());
System.out.printlnは( "1、グレードポイントの高い数学スコア:" + M)
のSystem.out.println( "2、達成グレード点における平均:" + E)
のSystem.out.println(「3、コンピュータネットワークのパフォーマンスグレード点平均: "+ N)
のSystem.out.println(" 4、GPA結果データベース: "+ D)
のSystem.out.println(" 5、ソフトウェアエンジニアリングGPA結果:「+ S)
のSystem.out.println( "あなたのGPAは:" + df.format(平均)) ;
IF(平均> 2)
System.out.println(「メッセージ:あなたはグレードポイントの卒業要件に達している!」);
他{
System.out.printlnは(「メッセージ:!あなたのグレードポイントは、卒業の要件を満たしていない」);
}
システム.out.println( "IFメインインターフェイスに戻る:(Y / N)");
のSystem.out.println(「************************************************************ ***********************************「);
文字列Scanner.next JS =();
IF(JS .equals( "Y")){
ディスプレイ();
}
他{
}
}
}
}
静的ボイド出口(){//出口システム
のSystem.out.println(「************* **********************************************「);
System.out.println(「ソフトウェア工学の学生管理システムのバージョン2019の石家荘鉄道研究所の使用のためにありがとう」);
System.out.printlnは(「プロデューサー:六和新」);
System.out.printlnは(「***** ************************************************** ****「);
にSystem.exit(0);
}
}
3.デバッグスクリーンショット