gpt4 book ai didi

java - 坡度曲线代码协助

转载 作者:行者123 更新时间:2023-12-01 15:28:30 33 4
gpt4 key购买 nike

好吧,我正在上计算机科学课,并创建了一个代码来允许老师评分和曲线评分这是代码:

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

我需要知道的是“分数”的技术术语位于 curveScores(scores) 方法中。我还需要知道通过方法传递的任何内容的技术名称

最佳答案

我认为您正在寻找的词是 "parameter"/"argument""integer array."

关于java - 坡度曲线代码协助,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9879932/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com