Question

In: Computer Science

Develop a program that calculates the final score and the average score for a student from...

Develop a program that calculates the final score and the average score for a student from his/her (1)class participation, (2) test, (3) assignment, (4) exam, and (5) practice scores.

The user should enter the name of the student and scores ranging from 0 to 100 for each grading item.

The final score is the sum of all grading items.

The average score is the average of all grading items.

Here is a sample output of the program:

Enter the Student's name: John Smith
Enter Class Participation Score ranging from 0 to 100: 89
Enter Test Score ranging from 0 to 100: 87
Enter Assignment Score ranging from 0 to 100: 67
Enter Exam Score ranging from 0 to 100: 99
Enter Practice Score ranging from 0 to 100: 80
John Smith: Final Score: 422 Average Score: 84.4

Solutions

Expert Solution

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


#include <iostream>
#include<cmath>
#include<iomanip>
using namespace std;

//Declaring the function
double getValidScore();
int main()
{
//setting the precision to two decimal places
   std::cout << std::setprecision(2) << std::fixed;
     
   //Declaring variables
string name;
double partciScore,testScore,assignScore,examScore,practiScore;
double tot,avg=0.0;

//Getting the input entered by the user
cout<<"Enter Enter the Student's name: ";
getline(cin,name);
  
cout<<"Enter Class Participation Score ranging from 0 to 100:";
partciScore=getValidScore();

cout<<"Enter Test Score ranging from 0 to 100:";
testScore=getValidScore();
cout<<"Enter Assignment Score ranging from 0 to 100:";
assignScore=getValidScore();
cout<<"Enter Exam Score ranging from 0 to 100:";
examScore=getValidScore();
cout<<"Enter Practice Score ranging from 0 to 100:";
practiScore=getValidScore();

//Performing calculations
tot=partciScore+testScore+assignScore+examScore+practiScore;
avg=tot/5;

//Displaying the output
cout<<name<<": Final Score: "<<tot<<" Average Score: "<<avg<<endl;

   return 0;
}
/* This function will get and return
* the valid score entered by the user
*/
double getValidScore()
{
   double score;
   while(true)
   {
       cin>>score;
       if(score<0 || score>100)
       {
           cout<<"** Invalid.Must be between 0-100 **"<<endl;
       }
       else
       {
           break;
       }
   }
   return score;
}

___________________________

Output:

_______________Could you plz rate me well.Thank You


Related Solutions

Create the pseudocode solution to a program that calculates the final score and letter grade for...
Create the pseudocode solution to a program that calculates the final score and letter grade for one student. Please use the following grading system: 9 Homework Assignments – 100 points each 10 points 11 Quizzes – 100 points each 5 points 5 Projects – 100 points each 10 points 6 Discussion posts – 100 points each 10 points 4 Exams – 100 points each 65 points A = 90 – 100% B = 80 – 89% C = 70 –...
ITP100 Project: Part 3 Create the pseudocode solution to a program that calculates the final score...
ITP100 Project: Part 3 Create the pseudocode solution to a program that calculates the final score and letter grade for one student. Please use the following grading system: 9 Homework Assignments – 100 points each 10 points 11 Quizzes – 100 points each 5 points 5 Projects – 100 points each 10 points 6 Discussion posts – 100 points each 10 points 4 Exams – 100 points each 65 points A = 90 – 100% B = 80 – 89%...
ITP100 Project: Part 3 Create the pseudocode solution to a program that calculates the final score...
ITP100 Project: Part 3 Create the pseudocode solution to a program that calculates the final score and letter grade for one student. Please use the following grading system: 9 Homework Assignments – 100 points each 10 points 11 Quizzes – 100 points each 5 points 5 Projects – 100 points each 10 points 6 Discussion posts – 100 points each 10 points 4 Exams – 100 points each 65 points A = 90 – 100% B = 80 – 89%...
Write a C program that calculates the average grade for a specified number of students from...
Write a C program that calculates the average grade for a specified number of students from each student's test1 and test2 grades. The program must first ask the user how many students there are. Then, for each student, the program will ask the user for the test1 grade (grade #1) and test2 grade (grade #2). The program should be able to handle up to 100 students, each with 2 grades (test1 and test2). Use a two-dimensional float array to store...
User asks you to develop a program that calculates and then prints interest earned on a...
User asks you to develop a program that calculates and then prints interest earned on a bank balance. Program should print interest earned for the same balance when interest is accumulated annually, semiannually and quarterly. I need the C++ code!
Create a small program that calculates the final grade in this course, given the different assignments...
Create a small program that calculates the final grade in this course, given the different assignments and exams you will be required to take. The program should ask for all the grades through the semester, and as a final output it should compute the weighted average as well as give the final letter grade. You should use the syllabus for this course to calculate the final grade. • Five assignments worth 30 points each. • Three projects worth 100 points...
A statistics professor claims that the average score on the Final Exam was 83. A group...
A statistics professor claims that the average score on the Final Exam was 83. A group of students believes that the average grade was lower than that. They wish to test the professor's claim at the  α=0.05α=0.05 level of significance. (Round your results to three decimal places) Which would be correct hypotheses for this test? H0:μ=83H0:μ=83, H1:μ≠83H1:μ≠83 H0:μ≠83H0:μ≠83, H1:μ=83H1:μ=83 H0:μ=83H0:μ=83, H1:μ>83H1:μ>83 H0:μ=83H0:μ=83, H1:μ<83H1:μ<83 H0:μ<83H0:μ<83, H1:μ=83H1:μ=83 A random sample of statistics students had the Final Exam scores shown below. Assuming that the...
Write a C program that calculates a student grade in the C Programming Class. Ask the...
Write a C program that calculates a student grade in the C Programming Class. Ask the user to enter the grades for each one of the assignments completed in class: Quiz #1 - 25 points Quiz #2 - 50 points Quiz #3 - 30 points Project #1 - 100 points Project #2 - 100 points Final Test - 100 points The total of the quizzes count for a 30% of the total grade, the total of the projects counts for...
Write a program that calculates the average of a four lab marks. It should use the...
Write a program that calculates the average of a four lab marks. It should use the following functions: • void getMarks() should ask the user for a lab marks, store it in a reference parameter variable, and validate it so that lab marks lower than 0 or higher than 100 is not accepted. This function should be called by main once for each of the four lab marks to be entered. • void avgGradeDisp() should calculate and display the average...
The average final exam score for the statistics course is 76%. A professor wants to see...
The average final exam score for the statistics course is 76%. A professor wants to see if the average final exam score for students who are given colored pens on the first day of class is higher. The final exam scores for the 16 randomly selected students who were given the colored pens are shown below. Assume that the distribution of the population is normal. 86, 97, 69, 93, 85, 88, 99, 67, 91, 85, 73, 66, 100, 90, 71,...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT