(A) https://www.freec X wex Eligible Expenses X Logout I Form Shooting Pr X Answered: Langu X Bb Upload Assignme X Bb CS170 Lab File, F X Bb Syllabus 2021...


Language: Java


1. The sample input will have to be in Text File (.TXT)


2. By using the first function, this program reads score and name values from a file. The program then determines the grade for each students by using the second function. Finally, the program displays the name, score, and grade information on the console. The two functions are shown in the images attached below:


(A) https://www.freec X<br>wex Eligible Expenses X<br>Logout<br>I Form Shooting Pr X<br>Answered: Langu X<br>Bb Upload Assignme X<br>Bb CS170 Lab File, F X<br>Bb Syllabus 2021<br>blackboard.truman.edu/bbcswebdav/pid-1156029-dt-content-rid-14602527_1/courses/2021404103/CS170%20Lab%20File%20Function%20Grade.pdf<br>A<br>Paused<br>CS170 Lab File, Function, Grade<br>1 / 2<br>100%<br>+ |<br>Lab: Functions, Files, and Grades<br>This assignment should demonstrate the use of functions. By using the first function, this<br>program reads score and name values from a file. The program then determines the grade for<br>each students by using the second function. Finally, the program displays the name, score,<br>grade information on the console. The two functions are shown below:<br>and<br>1. def readFileValues(fileName):<br># uses the fileName to prepare a file variable and open the file in read mode<br># reads a line from the file and split the line into tokens in order to get score values<br># stores the values in a scoreList variable<br># reads the next line from the file and split the line into tokens to get name values<br># stores the values in a nameList variable<br># returns both of the two lists to the calling function<br>2. def calculateGrade(score):<br># this function uses the score value to calculate the grade as the following:<br># if the score is between 90 and 100 then the grade is A<br># if the score is between 80 and 90 then the grade is B<br># if the score is between 70 and 80 then the grade is C<br># if the score is between 60 and 70 then the grade is D<br># if the score is between 50 and 60 then the grade is E<br># else the grade is F<br># returns the calculated grade to the calling function<br>The main function uses the readFileValues to read the score values and name values in the<br>scoreList variable and nameList variable respectively. It then loops through the scoreList values<br>to calculate the letter grade of the students. Lastly, it displays the name, score, and the<br>calculated grade for each of the students. The sample input and output of the program are<br>shown below:<br>Sample Input<br>98.5<br>88<br>92.5<br>78.5<br>68.5<br>69<br>85<br>Sue<br>Joe<br>Ann<br>Deb<br>Bob<br>Esa<br>Cole<br>...<br>II<br>

Extracted text: (A) https://www.freec X wex Eligible Expenses X Logout I Form Shooting Pr X Answered: Langu X Bb Upload Assignme X Bb CS170 Lab File, F X Bb Syllabus 2021 blackboard.truman.edu/bbcswebdav/pid-1156029-dt-content-rid-14602527_1/courses/2021404103/CS170%20Lab%20File%20Function%20Grade.pdf A Paused CS170 Lab File, Function, Grade 1 / 2 100% + | Lab: Functions, Files, and Grades This assignment should demonstrate the use of functions. By using the first function, this program reads score and name values from a file. The program then determines the grade for each students by using the second function. Finally, the program displays the name, score, grade information on the console. The two functions are shown below: and 1. def readFileValues(fileName): # uses the fileName to prepare a file variable and open the file in read mode # reads a line from the file and split the line into tokens in order to get score values # stores the values in a scoreList variable # reads the next line from the file and split the line into tokens to get name values # stores the values in a nameList variable # returns both of the two lists to the calling function 2. def calculateGrade(score): # this function uses the score value to calculate the grade as the following: # if the score is between 90 and 100 then the grade is A # if the score is between 80 and 90 then the grade is B # if the score is between 70 and 80 then the grade is C # if the score is between 60 and 70 then the grade is D # if the score is between 50 and 60 then the grade is E # else the grade is F # returns the calculated grade to the calling function The main function uses the readFileValues to read the score values and name values in the scoreList variable and nameList variable respectively. It then loops through the scoreList values to calculate the letter grade of the students. Lastly, it displays the name, score, and the calculated grade for each of the students. The sample input and output of the program are shown below: Sample Input 98.5 88 92.5 78.5 68.5 69 85 Sue Joe Ann Deb Bob Esa Cole ... II
(A) https://www.freec X<br>wex Eligible Expenses X<br>Logout<br>I Form Shooting Pr X<br>Answered: Langu X<br>Bb Upload Assignme X<br>Bb CS170 Lab File, F X<br>Bb Syllabus 2021<br>blackboard.truman.edu/bbcswebdav/pid-1156029-dt-content-rid-14602527_1/courses/2021404103/CS170%20Lab%20File%20Function%20Grade.pdf<br>A<br>Paused<br>CS170 Lab File, Function, Grade<br>2 / 2<br>100%<br>+ |<br>Sample Input<br>98.5<br>88<br>92.5<br>78.5<br>68.5<br>69<br>85<br>Sue<br>Joe<br>Ann<br>Deb<br>Bob<br>Esa<br>Cole<br>Sample Output<br>Sue<br>98.5<br>A<br>Joe<br>88<br>В<br>Ann<br>92.5<br>A<br>Deb<br>78.5<br>C<br>Bob<br>68.5<br>Esa<br>69<br>Cole<br>85<br>В<br>The lab description comes with a skeleton program (a program that highlights the algorithm<br>and provides some code) that you can use to complete the assignment.<br>The deliverables for this assignment are the program file and a screenshot demonstrating one<br>sample run of the program.<br>When you are satisfied with your program, you can submit the deliverables on the blackboard<br>course website by Monday, July 26. Please let me know if you have any questions. Thanks.<br>...<br>II<br>

Extracted text: (A) https://www.freec X wex Eligible Expenses X Logout I Form Shooting Pr X Answered: Langu X Bb Upload Assignme X Bb CS170 Lab File, F X Bb Syllabus 2021 blackboard.truman.edu/bbcswebdav/pid-1156029-dt-content-rid-14602527_1/courses/2021404103/CS170%20Lab%20File%20Function%20Grade.pdf A Paused CS170 Lab File, Function, Grade 2 / 2 100% + | Sample Input 98.5 88 92.5 78.5 68.5 69 85 Sue Joe Ann Deb Bob Esa Cole Sample Output Sue 98.5 A Joe 88 В Ann 92.5 A Deb 78.5 C Bob 68.5 Esa 69 Cole 85 В The lab description comes with a skeleton program (a program that highlights the algorithm and provides some code) that you can use to complete the assignment. The deliverables for this assignment are the program file and a screenshot demonstrating one sample run of the program. When you are satisfied with your program, you can submit the deliverables on the blackboard course website by Monday, July 26. Please let me know if you have any questions. Thanks. ... II
Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here