

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
The specification for cecs 174 project 5, which involves creating a c++ program to calculate the average, standard deviation, and grades of student scores. The program should read in student scores, determine the grade for each score, and keep track of the number of students in each grade category. The grading scale is based on the following scores: a for 90 or above, b for 80 to 89, c for 70 to 79, d for 60 to 69, and f for below 60. The program should also output the number of scores, average score, standard deviation, and the number of students in each grade category.
Typology: Lab Reports
1 / 2
This page cannot be seen from the preview
Don't miss anything!


One of the difficulties you had in Lab 4 was that the increments you made to a counter in a function seemed to have no effect in the main function since the counter was a local variable in the function. In this project you are to solve the problem using reference parameters (DO NOT use global variables). The specification of this project extends from Project 4 to include finding the standard deviation of the scores. Write a C++ program that reads in student scores. For each score it reads in, determine if the score is an A, B, C, D, or F, according to the scale given below. Your program should also keep track of the number of students in each grade category, and the average and standard deviation of all scores that the user inputs. Grading scale: A: score >= 90 B: 80 <= score < 90 C: 70 <= score < 80 D: 60 <= score < 70 F: score < 60 When your program executes, it should produce output as in the following sample dialogue: Enter all scores below, one score per line. Press control-d when done. 55 Input score is 55.00, grade F
Input score is 78.50, grade C 98 Input score is 98.00, grade A 77 Input score is 77.00, grade C
Input score is 80.55, grade B 90 Input score is 90.00, grade A Number of scores = 6 Average score = 79. Standard deviation = 13. Grade Number of Students A 2 B 1 C 2 D 0 F 1
C++ Statements Needed : Declaration for int and double variables. Predefined math functions. Input and output (cout << and cin >>). Loop, controlled by end of input. if-else statements. Function for the determination and output of the appropriate grade for a given score. This function should use some reference parameters.
Do the following: Name your program file lab5.cpp and place it in your 174 subdirectory. Document your program following the Program Documentation Guide which may be accessed through http://www.cecs.csulb.edu/~lam/cecs174/course-notes.html Make sure your program’s output matches the sample dialogue given above. Use script to get a typescript file that captures: a) cat lab5.cpp b) g++ lab5.cpp c) a.out. Print and hand in a hardcopy of the typescript file. Demo your program on the due date.