Question

Hello, I am trying to calculate a student current average in a class based on their...

Hello, I am trying to calculate a student current average in a class based on their Quiz, Homework, Test, Project, and Final Exam grade. Quizzes are worth 20% of the grade. Homework is 15% of the grade. Tests are 35% of the grade. Projects are worth 10% of the grade and the Final Exam is worth 20% of the grade. The program reads how many quizzes, tests, homework, and projects the user enters and the scores that are entered by the user. However, the average is computed before the final exam is taken so the relative weights of the other categories will need to be adjusted. Therefore, the program is only computing quizzes, tests, homework, and projects. How would I compute the average? Please use c++ coding. Thanks!

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Note: Could you plz go through this code and let me know if u need any changes in this.Thank You
=================================

#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <vector>
using namespace std;

// Function Declarations
void giveIntro();

double getHomeWorkAvg();
double getQuizAvg();
double getTestAvg();
double getProjectScore();
  
double getFinalExamGrade();
int main() {
//calling the functions
giveIntro();

double homeWorkAvg=getHomeWorkAvg();
double quizAvg=getQuizAvg();
double testAvg=getTestAvg();
double projAvg=getProjectScore();
  
double finalExamGrade=getFinalExamGrade();
  
//Calculating the overall average
double overAllGrade=0.15*homeWorkAvg+0.20*quizAvg+0.35*testAvg+0.10*projAvg+0.20*finalExamGrade;
  
//Displaying the output
cout<<"The Overall Grade is :"<<overAllGrade<<endl;

  
   return 0;
}

void giveIntro() {
cout<<"Welcome to the Grade Calculator!"<<endl;
cout<<"\nThis program will input your homework , quizzes , tests"<<endl;
cout<<"and final exam and calculator your average."<<endl;
}

double getHomeWorkAvg()
{
    int count=0;
double sum=0,val;
cout<<"\nHow many homework grades to be entered?:";
cin>>count;
  
for(int i=0;i<count;i++)
{
cout<<"Grade "<<(i+1)<<":";
cin>>val;
sum+=val;
}
  
return ((double)sum/count);

}
double getQuizAvg()
{
   int count=0;
double sum=0,val;
cout<<"\nHow many quiz grades to be entered?:";
cin>>count;
  
for(int i=0;i<count;i++)
{
cout<<"Grade "<<(i+1)<<":";
cin>>val;
sum+=val;
}
  
return ((double)sum/count);

       }
double getTestAvg()
{
int count=0;
double sum=0,val;
cout<<"\nHow many test grades to be entered?:";
cin>>count;
  
for(int i=0;i<count;i++)
{
cout<<"Grade "<<(i+1)<<":";
cin>>val;
sum+=val;
}
  
return ((double)sum/count);
  
       }
double getProjectScore()
{
   int count=0;
double sum=0,val;
cout<<"\nHow many Project grades to be entered?:";
cin>>count;
  
for(int i=0;i<count;i++)
{
cout<<"Grade "<<(i+1)<<":";
cin>>val;
sum+=val;
}
  
return ((double)sum/count);
       }
      
       double getFinalExamGrade()
       {
           double val;
           cout<<"Enter the Final exam grade :";
           cin>>val;
           return val;
       }

=======================================

output:

=====================Could you plz rate me well.Thank You

Add a comment
Know the answer?
Add Answer to:
Hello, I am trying to calculate a student current average in a class based on their...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • C++ Write a program to calculate final grade in this class, for the scores given below...

    C++ Write a program to calculate final grade in this class, for the scores given below . Remember to exclude one lowest quiz score out of the 4 while initializing the array. Display final numeric score and letter grade. Use standard include <iostream> Implementation: Use arrays for quizzes, labs, projects and exams. Follow Sample Output for formatting. May use initialization lists for arrays. Weight distribution is as follows: Labs: 15% Projects: 20% Quizzes: 20% Exams: 25% Final Project: 20% Display...

  • This is a C++ Program, I need the program broken up into Student.h, Student.cpp, GradeBook.h, GradeBook.cpp,...

    This is a C++ Program, I need the program broken up into Student.h, Student.cpp, GradeBook.h, GradeBook.cpp, and Main.cpp 1. The system must be able to manage multiple students (max of 5) and their grades for assignments from three different assignment groups: homework (total of 5), quizzes (total (total of 2) of 4), and exams 2. For each student record, the user should be able to change the grade for any assignment These grades should be accessible to the gradebook for...

  • Grading Policy In addition to three in-class tests and a final exam, the final grade will...

    Grading Policy In addition to three in-class tests and a final exam, the final grade will include assessment of homework, quiz projects/classroom activities, and classroom participation, according to the following weights 1. Homework and Worksheets 2. Three Tests 3. Final Exam 4. Quizzes and Class Participation/Classroom Citizenshi 1 5% 40% 25% 20% Total 100% Grad Ran 92 100 90-91 88-89 82-87 80-81 an 78 -79 70-77 68 -69 66 67 60- 65 Assignment Grading: Each written assignment, except the Final...

  • Write a program to calculate your final grade in this class. Three(8) assignments have yet to...

    Write a program to calculate your final grade in this class. Three(8) assignments have yet to be graded: Quiz 7, Lab 7 and Final Project. Assume ungraded items receive a grade of 100 points. Remember to drop the lowest two quiz scores. Display final numeric score and letter grade. Implementation: Weight distribution is listed in canvas. Use arrays for quizzes, labs, projects and exams. You are allowed to use initialization lists for arrays. Use at least three (3) programmer defined...

  • Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might...

    Many classes calculate a final grade by using a weighted scoring system. For example, “Assignments” might be worth 40% of your final grade. To calculate the grade for the Assignments category, the teacher takes the percentage earned on the assignments and multiplies it by the weight. So if the student earned a 90% total on the Assignments, the teacher would take 90% x 40, which means the student earned a 36 percent on the Assignments section. The teacher then calculates...

  • c++ implement a student class Determine the final scores, letter grades, and rankings of all students...

    c++ implement a student class Determine the final scores, letter grades, and rankings of all students in a course. All records of the course will be stored in an input file, and a record of each student will include the first name, id, five quiz scores, two exam scores, and one final exam score. For this project, you will develop a program named cpp to determine the final scores, letter grades, and rankings of all students in a course. All...

  • Language: C++ Write a program that will allow the instructor to enter the student's names, student...

    Language: C++ Write a program that will allow the instructor to enter the student's names, student ID, and their scores on the various exams and projects. A class has a number of students during a semester. Those students take 4 quizzes, one midterm, and one final project. All quizzes weights add up to 40% of the overall grade. The midterm exam is 25% while the final project 35%. The program will issue a report. The report will show individual grades...

  • Model 1. A student taking a class will receive a grade based upon the following percentages:...

    Model 1. A student taking a class will receive a grade based upon the following percentages: • test average 50% • homework average 20% • final exam grade 30% Her grades were: • 5 tests grades of 75, 65, 71, 52, and 87. Average = 70 • 8 homework grades of 90, 80, 10, 75, 92, 105, 90, and 100. Average = 80.3 • final examination grade of 79. Her final grade for the course was 75. 1. Using the...

  • In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each gr...

    In C Langage Write a grading program for a class with the following grading policies:- a. There are two quizzes, each graded on the basis of 10 points. b. There is one midterm exam and one final exam, each graded on the basis of 100 points. c. The final exam counts for 50 percent of the grade, the midterm counts for 25 percent and the two quizzes together count for a total of 25 percent. Grading system is as follows:-...

  • I asked a question similar to this one, which was answered perfectly. Another practice problem is...

    I asked a question similar to this one, which was answered perfectly. Another practice problem is now asking me to use two classes and get user input. For this Java program, you will write two classes: GradeCalculator and GradeCalculatorDriver In the GradeCalculator class, compute the final average and letter grade for a particular student. The final average is calculated according to the following rules: 1) There are ten exams scored out of 100 points 2) The lowest exam score is...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT