April 12, 2018
Today’s lab is devoted to Project #5. Download the following archive: Project5, extact it and open it in Visual Studio.
The project contains two files: Program.cs
and ArrayLib.cs
.
Program.cs
is just the “application program”, here to test the methods written in ArrayLib.cs
.ArrayLib.cs
is an (incomplete) “library” of methods to manipulate arrays. It is static, so that we don’t need to create objects in Program.cs
.Your goal is to complete ArrayLib.cs
, i.e., to write the body of the methods FindMax
, FindMin
, Average
, etc. You are not supposed to change the headers of these methods, but only to complete their bodies: change them so that they return the expected values instead of always returning 0 (or false
) as they do now. Use Program.cs
to check your answer, and edit it if you want to perform other tests (but, please, don’t spend too much time tweaking the displaying).
Your project is due 04/19, before midnight, you can turn it in using any method (but please, be aware that sending projects through emails can be buggy). Do not copy-and-paste code from other source, or re-use methods from a pre-existing class: this lab is about writing your own methods!
If you feel comfortable with your project, there are two additional challenges for you:
ArrayLib.cs
.