简体   繁体   English

协助坡度曲线代码

[英]Assistance with a Grade Curve code

Alright so I am in a computer science class and have created a code to allow teachers to grade and curve the grade Here is the code: 好吧,所以我在计算机科学课上,已经创建了一个代码,允许老师对成绩进行评分和弯曲这是代码:

import java.util.Arrays;

import java.util.Scanner;

public class GradeCurve {

 public static void main(String[] args) {


 Scanner scan = new Scanner( System.in );
    System.out.print("Number of students for test? ");
        int n = scan.nextInt();
        int [] scores = new int[n];

        for ( int i = 0; i < scores.length; i++ )

 {

     System.out.println( "Enter Score Number: "+ ( i + 1 ));

     scores[i] = scan.nextInt();
 }

    Arrays.sort(scores);
    System.out.println("Actual Scores:");
    for(int x = 0; x <= scores.length - 1; x++)
    {
         System.out.println(scores[x]);
    }
    System.out.println();
    curveScores(scores);

}


public static void curveScores(int[] s)
{
    int[] sortedScores = s;
    Arrays.sort(sortedScores);
        int curve = 100 - sortedScores[sortedScores.length - 1];
        System.out.println("Adjusted Scores:");
        for(int x = 0; x <= s.length - 1; x++)
    {
        System.out.println((s[x] + curve));
    }
}
}

What I need to know is the technical term for "scores" is in the curveScores(scores) method. 我需要知道的是“分数”的技术术语是在curveScores(scores)方法中。 I also need to know the technical name of anything that is being passed through a method 我还需要知道通过方法传递的任何东西的技术名称

我认为您要查找的单词是“参数” /“参数”“整数数组”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM