[Solved] make a program to solve the following problem. Text file scores.txt... 您所在的位置:网站首页 scorejava [Solved] make a program to solve the following problem. Text file scores.txt...

[Solved] make a program to solve the following problem. Text file scores.txt...

#[Solved] make a program to solve the following problem. Text file scores.txt... | 来源: 网络整理| 查看: 265

make a program to solve the following problem.

Text file scores.txt contains grade data for an unknown number of students. You can assume there is at least one data set. A do loop is used to get the filename "scores.txt" from the user. Do not edit the data file. The first line is the student name. The second line contains the scores on 3 exams. The third line contains the scores on 10 assignments. The fourth line contains an unknown number of scores for discussion participation.

The exam average is the average of 3 exam scores and is 45% of overall average.

The lowest assignment score is dropped. The assignment average is the average of remaining scores and

is 45% of overall average.

The student is awarded discussion points for the number of discussion grades. 10 points are awarded for

greater than or equal to 8 postings, 5 points are awarded for 6-7 postings and 0 points are awarded for

less than 6 postings.

The letter grade is determined by:

overall average >= 90 A overall average >= 80 B overall average >= 70 C overall average >= 60 D overall average < 60 F

Required Code Constructs:

Code should make use of a File Scanner object.

Code should make use of at least one String Scanner object.

Grading Rubric:

The program is not accepted if it does not compile.The program is not accepted if it does not use file input with a Scanner object. --------------------------------------------------------------------------------------------------------------------------

Commenting is done per description in previous projects.Constants and variables are declared and used appropriately.A do loop is used to get the correct input file name.The loop to read all lines from the file is correct.The use of String Scanner is correctly done.The exam average is correct.The assignment average is correct.The discussion points are correct.The logic to award a letter grade is correct.Output is clear and easy to read.



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有