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

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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
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
Transcribed Image 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
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
Transcribed Image 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
Expert Solution
steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY