In this assignment you are asked to write a program that calculates a letter grade for each student upon reading records of information from a grade.txt file. The contents of the grade.txt file is like the following but, of course, may have more lines: Exam% Quiz % Homework % 30 5 5 100 89 80 80 100 80 80 90 80 Names John Sebastian 90 99 Brown Ford 40 60 Mary Einstein 80 80 15 20 John Brown Mary 5 4 4 90 86 88 A if average grade is > 90. B if average grade is > 80 and <= 90 Cif average grade is > 70 and <= 80 D if average grade is > 60 and <= 70 F if average grade is <= 60 Your output file, "gradeoutput.txt", should display the following information: First Name Last Name Sebestian Ford Einestein Exam 63.3 42 52 89 90 83 81 89 90 83 81 89 Each line consists of first name, last name, 3 exam grades (the first 2 exams are worth 15% and 20%, respectively, while the third exam is worth 30%), followed by three quizzes and five homework grades. Each quiz is worth 5% ( 15% total); the five homework grades are worth 20% ( 4% each). After your program reads in the first and last names, it will read in the exam, quiz, and homework grades in the order. For each student it should call a function called letter_grade() to calculate letter grade based on weighted average score using the following formula: Quiz 12.95 13.5 13 Assignment 18.48 17.6 16.8 99 100 Sum 94.73 73.1 81.8 97 90 97 70 Letter Grade A C B If you have any questions, please, feel free to send me an e-mail or set up a zoom meeting. Good Luck!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Could you write a C++ program for this that works.

In this assignment you are asked to write a program that calculates a letter grade for each student upon
reading records of information from a grade.txt file.
The contents of the grade.txt file is like the following but, of course, may have more lines:
Exam %
Quiz %
Homework %
15 20 30
5
5
4 4 4
90 99
100
89
80
86
88 89
99 100
40 60 80 100
80
90 83
81
89 97 90
80 80 80 90 80
90 83 81 89 97 70
Names
John Sebastian
Brown Ford
Mary Einstein
A if average grade is > 90
B if average grade is > 80 and <= 90
C if average grade is > 70 and <= 80
D if average grade is > 60 and <= 70
F if average grade is <= 60
Each line consists of first name, last name, 3 exam grades (the first 2 exams are worth 15% and 20%,
respectively, while the third exam is worth 30%), followed by three quizzes and five homework grades.
Each quiz is worth 5% ( 15% total); the five homework grades are worth 20% ( 4% each). After your
program reads in the first and last names, it will read in the exam, quiz, and homework grades in the
order. For each student it should call a function called letter_grade() to calculate letter grade based on
weighted average score using the following formula:
5
90
Exam
63.3
42
52
4
Your output file, "gradeoutput.txt", should display the following information:
First Name Last Name
John
Sebestian
Ford
Brown
Mary
Einestein
Quiz
12.95
13.5
13
Assignment
18.48
17.6
16.8
Sum
94.73
73.1
81.8
Letter Grade
A
C
B
If you have any questions, please, feel free to send me an e-mail or set up a zoom meeting. Good Luck!
Transcribed Image Text:In this assignment you are asked to write a program that calculates a letter grade for each student upon reading records of information from a grade.txt file. The contents of the grade.txt file is like the following but, of course, may have more lines: Exam % Quiz % Homework % 15 20 30 5 5 4 4 4 90 99 100 89 80 86 88 89 99 100 40 60 80 100 80 90 83 81 89 97 90 80 80 80 90 80 90 83 81 89 97 70 Names John Sebastian Brown Ford Mary Einstein A if average grade is > 90 B if average grade is > 80 and <= 90 C if average grade is > 70 and <= 80 D if average grade is > 60 and <= 70 F if average grade is <= 60 Each line consists of first name, last name, 3 exam grades (the first 2 exams are worth 15% and 20%, respectively, while the third exam is worth 30%), followed by three quizzes and five homework grades. Each quiz is worth 5% ( 15% total); the five homework grades are worth 20% ( 4% each). After your program reads in the first and last names, it will read in the exam, quiz, and homework grades in the order. For each student it should call a function called letter_grade() to calculate letter grade based on weighted average score using the following formula: 5 90 Exam 63.3 42 52 4 Your output file, "gradeoutput.txt", should display the following information: First Name Last Name John Sebestian Ford Brown Mary Einestein Quiz 12.95 13.5 13 Assignment 18.48 17.6 16.8 Sum 94.73 73.1 81.8 Letter Grade A C B If you have any questions, please, feel free to send me an e-mail or set up a zoom meeting. Good Luck!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 6 steps with 3 images

Blurred answer
Knowledge Booster
File Input and Output Operations
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education