Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am very confused on how to write this program. Please help! For this assignmen

ID: 3623223 • Letter: I

Question

I am very confused on how to write this program. Please help!

For this assignment, write a program that will calculate the course average for a student in CSCI 240 after a few weeks of the semester have passed.

The program should:

*prompt the user for the total program points that have been earned


*prompt the user for the maximum program points possible


*If the maximum program points is less than the total program points, display an error message and get a new value from the user (we'll make the assumption that the user will enter a valid maximum program points value on the second try).


*prompt the user for the total quiz points


*prompt the user for the number of quizzes that have been taken (we'll make an assumption that at least 3 have been taken)


*prompt the user for the sum of the two lowest quiz scores


*prompt the user for the total test points that have been earned (0 if no tests have been taken)


*If the total test points is not 0, then prompt the user for the maximum test points possible. If the maximum test points is less than the total test points, display an error message and get a new value from the user (again, we'll make the assumption that a valid value is entered this time).


*use the values that the user entered to calculate the program average, quiz average, overall test average, and the course average.


*display the various averages with two digits after the decimal point, one per line with an appropriate label.

Calculations

The program average is calculated as total program points / maximum program points possible * 100. You may assume that there is at least one program score.

The quiz average is calculated as (total quiz points - sum of the two lowest quiz scores) / ((number of quizzes - 2) * 10) * 100. As noted above, you may assume that at least 3 quizzes have been taken.

The overall test average is a combination of the quiz average and test average. It is calculated as (total test points + total quiz points - sum of the two lowest quiz scores) / (maximum test points possible + (number of quizzes - 2) * 10)) * 100.

The course average is the weighted average of the program and overall test averages. The programs are weighted at 40% and the overall tests are weighted at 60%.

Explanation / Answer

please rate - thanks

these formulas don't make sense, and the one for test average has an extra ) in it. the formulas are exactly as specified (except test- which is with the extra ) )when I do the math by hand or computer I get the same

#include <iostream>
#include <iomanip>
using namespace std;
int main()
{int t_pts,max_pts,t_quiz,quizes,sum_low_q,total_t,max_t;
double pavg,qavg,tavg,avg;
cout<<"Enter the total program points that have been earned: ";
cin>>t_pts;
cout<<"Enter the maximum program points possible: ";
cin>>max_pts;
if(max_pts<t_pts)
    {cout<<"maximum program points cannot be less than the total program points ";
     cout<<"Ee-enter the maximum program points possible: ";
     cin>>max_pts;
     }
cout<<"Enter the total quiz points: ";
cin>>t_quiz;
cout<<"Enter the number of quizzes taken: ";
cin>>quizes;
cout<<"Enter the sum of the two lowest quiz scores: ";
cin>>sum_low_q;
cout<<"Enter the total test points that have been earned (0 if no tests have been taken): ";
cin>>total_t;
if(total_t!=0)
    cout<<"Enter the maximum test points possible: ";
cin>>max_t;
if(max_t<total_t)
    {cout<<"maximum test points cannot be less than the total test points ";
     cout<<"Ee-enter the maximum test points possible: ";
     cin>>max_pts;
     }
pavg=t_pts/(double)max_pts*100.;
qavg=(t_quiz-sum_low_q)/((quizes-2.)*10.)*100.;
tavg=(total_t+t_quiz-sum_low_q)/(max_t+(quizes-2.)*10.)*100.;
avg=.4*pavg+.6*tavg;

cout<<"Program Average: "<<setprecision(2)<<fixed<<pavg<<endl;
cout<<"Quiz Average:    "<<setprecision(2)<<fixed<<qavg<<endl;
cout<<"Test Average:    "<<setprecision(2)<<fixed<<tavg<<endl;
cout<<"Course Average: "<<setprecision(2)<<fixed<<avg<<endl;
system("pause");
return 0;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote