Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RainFall
- {
- private double[] rain;
- /*
- public RainData(double[] r)
- {
- rain = new double[r.length];
- for (int index = 0; index <r.length; index++)
- rain[index] = r[index];
- }
- */
- public static double getTotal()
- {
- double total = 0.0;
- for (int index = 0; index < rain.length; index++)
- total += rain[index];
- return total;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement