Statistics Calculator
The following table contains a description of a small statistics programs. This program reads a number of values from the user, and then outputs some statistics calculated from these values. This program will make use of arrays to store the values entered, and then calculate the required statistics.
Name | Statistics Calculator |
Description | Reads values from the user and calculates a range of statistics that are output to the Terminal. Statistics output include mean, maximum, and sum. |
As before, the process to design and implement this program will follow a number of steps:
- Understand the problem, and get some ideas on the tasks that need to be performed.
- Choose the building blocks we will create and use
- Design the control flow for the functions and procedures we need
- Implement our design
- Compile, run, and test the program
It is important to code as you go, so we will be implementing the design as we go through the steps.
Understanding Statistics Calculator
Most of the ideas around the statistics calculator should be fairly straight forward. The main things to be checked are the equations needed to calculate the different statistics, and then to convert these into steps for the computer. This should allow us to focus on arrays, and how we can use them to store the values entered by the user.