Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer using C++ information (PLEASE USE MICROSOFT VISUAL STUDIOS 2017) In this assignment you are asked to write a program that calculates a letter grade

Answer using C++ information (PLEASE USE MICROSOFT VISUAL STUDIOS 2017)

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 similar to the following, but will have more lines:

John Sebastian 90 80 85 89 80 90 86 88 89 99 100

Brown Ford 40 60 80 100 80 90 83 81 89 97 90

Each line consists of first name, last name, 3 test grades (the first 2 tests each are worth 15%, and the third test is worth 25%), followed by three quiz and five homework grades. Each quiz is worth 5% (15% total); the five homework grades are worth 25% (5% each). After your program reads in the first and last names, it will read in the test, quiz and homework grades in the order. For each student it should call a function called letter_grade() to calculate the weighted average scores. It should pass the scores and the weights in two separate arrays to the function. The function using the following formula:

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

upon determining the letter grade must return a letter grade to the main program where the output will then be printed to a file called "gradeoutput.txt" with the following information:

Name Last WE WQ WA Sum Letter Grade

John Sebastian 46.75 12.95 23.10 82.8 B

Brown Ford 36.00 13.50 22.00 71.50 C

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management With Website Development Applications

Authors: Greg Riccardi

1st Edition

0201743876, 978-0201743876

More Books

Students also viewed these Databases questions