作业 4:使用 studentdata.txt 的数组 [关闭]

问题描述 投票:0回答:0

我不知道该怎么做。请显示输出窗口的例子 使用 studentdata.txt 编写程序 下载该文件并将其粘贴到项目根目录下的 NetBeans 项目中。该文件包含数百条记录,其中每条记录包含学生的 S-number 和他们的 gpa。您的程序必须读取 id 号和 gpa 并将数据传输到两个单独的数组中。您可以假设文件中的学生永远不会超过 1000 人。使用两个额外的数组来完成程序的要求创建一个称为直方图的简单图表,以显示有多少学生属于 8 个不同类别中的每个类别,显示数据如何在一个范围内分布。对于输入文件中的每个学生,显示他们的 S-number、gpa 和班级排名。您将必须计算他们的班级排名。数据包含平均绩点,直方图将包括 8 类 gpa:0.0 <= gpa < 0.5, 0.5 <= gpa < 1.0, 1.0 <= gpa < 1.5, 1.5 <= gpa < 2.0, 2.0 <= gpa < 2.5, 2.5 <= gpa < 3.0, 3.0 <= gpa < 3.5, 3.5 <= gpa <= 4.0 the histogram might look like is: 0.0 to 0.49 (48) **** 0.5 to 0.99 (82) ******** 1.0 to 1.49 (65) ******* The number in parentheses represents the total number of students that fall within that category. Each * represents 10 students rounded to the nearest 10. display the student id number, the gpa, and the student’s class rank. The class rank is indicating the number of students who have a better gpa if the student's rank is 27, it means that there are 26 other students who have a gpa that is better than the student with rank 27. output all the students in the order they are in the input file such as : S316542 3.45 27 S29463 1.42 801 S969870 2.75 T64 with 8 others the rank for the last student indicates T64 which means that there are 63 students with a gpa better than this student. It also indicates that this student's gpa of 2.75 is the same as 8 other students program should also work with any input file assuming it will never contain more than 1000 students. project folder must use my input file when submitting the program

我尝试了很多不同的代码、程序、方法和课程,但我无法弄明白

java netbeans-8
© www.soinside.com 2019 - 2024. All rights reserved.