CS174: OOP - Drills - Computing the mean of arrays
Developed by Professor Tralie and Professor Mongan.
Exercise Goals
The goals of this exercise are:- To do proper array indexing
- To use loops in concert with arrays
- To declare accumulator variables outside of loops that are used in loops, but whose state persists beyond the loop
- To use proper types
- To handle boundary cases
{0, 5, 2, 4}
is 2.75
. Finally, if an empty array is passed to your method, you should return 0.0. Recall that this is referred to as a boundary case or edge case in testing.
Welcome to our online modules system!
Be sure to log in with your Urinus ID
before you proceed.
For example, Professor Tralie's ID is ctralie.
If you are not an Ursinus student, that's fine!
Just make something up, and you can still run everything