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

  • 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

  • Write a grading program for the following grading policies:- a. There are two quizzes, each graded...

    Write a grading program for 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:- >90 A >=80 and <90 B...

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

  •   -You are going to write a program to help me determine the final grade and...

      -You are going to write a program to help me determine the final grade and calculate some summary stats. The steps are described below: 1. First, create a dictionary of 10 students with student name as key and score as value. •For simplicity, name students as student 1, student 2, etc. Scores are random integers from 0-100 2. Calculate the average score in the class 3. Determine the letter grade based on the following scheme :•A if score >=...

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
ADVERTISEMENT