Question

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 final grade ( numeric and letter).

OUTPUT SAMPLE:

Lab grades: 80,90,100,50,50,80,100

Project grades : 95,88,90,100,100

Quiz grades: 100,90,70 //Excluded One Quiz Score so we have 3 Quizzes

Exam grades: 90, 100

Final Project Grade : 100
Bonus Points: 4

_______________________________________________________________________________________________________________________

Average for Labs: 78.5714                                                                                                               

Average for Projects: 94.6                                                                                                              

Average for Quiz: 86.6667                                                                                                               

Average for Exams: 95                                                                                                                   

Final Project Score: 100                                                                                                                

Bonus Score: 4                                                                                                                          

Percentage for the class: 95.789   

Letter Grade = : A

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

Program to calculate the final grade:

#include <iostream>

using namespace std;

int main() {

int lb[] = {80,90,100,50,50,80,100};

int pg[] = {95,88,90,100,100};

int q[] = {100,90,70};

int e[] = {90, 100};

int fpg = 100;

int bonusp = 4;

float lbsum,pgsum,qsum,esum,lbs,pgs,qs,es;

lbsum = pgsum = qsum = 0;

lbs = sizeof(lb)/sizeof(lb[0]);

pgs = sizeof(pg)/sizeof(pg[0]);

qs = sizeof(q)/sizeof(q[0]);

es = sizeof(e)/sizeof(e[0]);

for(int i=0;i<lbs;i++) {

lbsum += lb[i];

}

for(int i=0;i<pgs;i++) {

pgsum += pg[i];

}

for(int i=0;i<qs;i++) {

qsum += q[i];

}

for(int i=0;i<es;i++) {

esum += e[i];

}

cout << "Average for Labs:" << lbsum/lbs << endl;

cout << "Average for Projects:" << pgsum/pgs << endl;

cout << "Average for Quiz:" << qsum/qs << endl;

cout << "Average for Exams:" << esum/es << endl;

double per;

per = ((0.15)*(lbsum/lbs)) + ((0.2)*(pgsum/pgs)) + ((0.2)*(qsum/qs)) + ((0.25)*(esum/es)) + ((0.2)*(fpg));

cout << "Bonus Score:" << bonusp << endl;

cout << "Percentage for class:" << per + bonusp << endl;

if((per+bonusp)>90) {

cout << "Letter Grade=:A" << endl;

}

return 0;

}

Add a comment
Know the answer?
Add Answer to:
C++ Write a program to calculate final grade in this class, for the scores given below...
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
  • 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...

  • Help me write the program in C++ Thanks Program #1: Calculate a student's grade for a...

    Help me write the program in C++ Thanks Program #1: Calculate a student's grade for a class. The class has 4 categories of grades. Each category has different weights. The student's report should include the student's first and last name; course; semester, category listing with weight for each category, grades for each category and the student's final average with a letter grade. Categories with weights: 1. Exams: 30%(3 @ 10% each) 2. Labs: 30% (3 labs @ 10% cach) 3....

  • 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:-...

  • using if/switch statements (C++) Write a grading program for a class with the following grading policies:...

    using if/switch statements (C++) Write a grading program for a class with the following grading policies: There are two quizzes, each graded on the basis of 10 points There is one midterm exam and one final exam, each graded on the basis of 100 points The final exam counts for 50% of the grade, the midterm counts for 25% and the two quizzes together count for a total of 25%. (Do not forget to normalize the quiz scores. They should...

  • Write a grading program in Java for a class with the following grading policies: There are...

    Write a grading program in Java for a class with the following grading policies: There are three quizzes, each graded on the basis of 10 points. There is one midterm exam, graded on the basis of 100 points. There is one final exam, graded on the basis of 100 points. The final exam counts for 40% of the grade. The midterm counts for 35% of the grade. The three quizzes together count for a total of 25% of the grade....

  • Write a program that will calculate your letter grade at the end of the semester for...

    Write a program that will calculate your letter grade at the end of the semester for CSIS130. Your program will read an input file that shall contain all the tests scores and lab scores for the semester, and the input file data should be in the following format: full name of student Test1 Score (0…100), Test2 Score (0..100) , Final Exam Score (0..100), Total Number of Labs: N NLab Scores (0=Fail, 1=Pass) [You will have N lab scores each separated...

  • 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...

  • 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...

  • A students grades and weights are given below, calculate the final grade by calculating a weighted...

    A students grades and weights are given below, calculate the final grade by calculating a weighted average. (Data given in image) Calculate the students final grade: ____% A student's grades and weights are given below. Calculate the final grade by calculating a weighted average. Category Grade Earned Weight of Grade 15% 10% 25% 509% In-class Work61.8% 80.79% 51.7% 56.29% Homework Quizzes Exams 96 Calculate the student's final grade: Round your answer to one decimal place

  • You will create a Grade Program that will calculate students’ weighted averages. You are going to...

    You will create a Grade Program that will calculate students’ weighted averages. You are going to have the user enter lab grades, test grades, and project grades. You will then display a grade report of each individual average along with their overall average and letter grade. Ask the user to enter their lab grades. Call the averageGrade function that will allow the user to enter their grades and calculate their average. averageGrade Function: This will pass the average back to...

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