Programming assignment #1
Mean and Standard Deviation
INTRODUCTION
In this programming assignment you are required to understand the problem definition given below, solve the problem, program your solution in the C++ programming language, and document your solution.
PROBLEM
The mean (average) and standard deviation calculator allows the user to enter the name of a class and 10 scores. The calculator then displays a message as follows:
SummerCS115test1: mean = 75.7 and standard deviation = 9.3
The word SummerCS115test1 is replaced by the name entered and 75.7 and 9.3 are replaced by the numbers calculated by the program. Use C++ functions to display the numbers to one decimal place. The scores should be of either type float or double.
The mean is just a result of dividing the sum of scores by 10. In mathematical notation, the sum is represented by the Greek letter capital sigma (ⵉ). Let n = 10. Each score is written as xi. Where i is a variable that takes the places of the score number so that i=1 for the first score, i=2 for the second and so on. Therefore, the mean (x) is written mathematically as: nxxiiiΣ===100
The standard deviation is square root of a result of the sum of squares of differences between scores and the mean divided by n – 1 (Again in this problem n=10). Therefore, the standard deviation (s) is written mathematically as: 1)(1002−−=Σ==nxxsiii
Here, the symbol √ means square root.
THE C++ PROGRAM
Your program should have meaningful variable names, comments, and indentation. The program should compile and run. The program should do what is specified in the PROBLEM section above.
*** Use only features of C++ that are found in chapters 1, 2, and 3 of your textbook.
Programs that use features beyond the scope of these chapters will get a 0 score. ***
The program should have the following features:
1) The first few lines of your program should be comments that state:
• the program name,
• the