Cover page images (keyboard)

Lab 10 - Data Types

Sue Evans



Press space bar for next screen

Objectives












Step 0 - Set up












Exam Data

Step 1 - Design













Step 2 - main() & stubs

Write the top-level functions

Testing Time












Step 3 - readFile()

Write readFile(filename)

Testing Time













Step 4 - findMean()

Step 5 - complete main()












Bonus Step

Prompt for a name of a student in the file and print if they are above or below the mean.

Challenge Step - Standard Deviation

Find the standard deviation of the scores.

The standard deviation is a measure of how spread out the data is relative to the mean. If the data is tightly clustered around the mean then the standard deviation is small. When the data is more spread out, the standard deviation is large.

Write a function findStdDev() that calculates the standard deviation of the scores. Here's the formula:

where bar x represents the mean,
x i represents the ith data value,
and n is the number of data values.

Sigma means the sum of whatever follows it.