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...
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 termtest and final grade. The program must first ask the user how many students there are. Then, for each student, the program will ask the user for the termtest grade (grade #1) and final grade (grade #2). The program should be able to handle up to 100 students, each with 2 grades (termtest and final). Use a two dimensional float array to...
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...
Write a program that calculates the student's final grade for a test with 20 multiple questions...
Write a program that calculates the student's final grade for a test with 20 multiple questions using C# .net Framework. se an array of integers to store the test scores (0-incorrect answer, 1-correct answer). Initialize it as follows: int [] scores = {1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1}; 3. If the student answered the question right, add 5 points to the running total. If the student...
Write a C++ program named, myGrade.cpp, that calculates a letter grade for a student of this...
Write a C++ program named, myGrade.cpp, that calculates a letter grade for a student of this course (CSC100 online) based on three user inputs. This program should begin by printing the title of the application (program) and a brief description of what it does. (Note: this is NOT the same as the program prolog: a prolog is much more detailed, has required elements, and is intended for other programmers reading the cpp file. The title and description displayed by the...
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...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT