Make method sum to include a while looppay attention on


Pay attention on terminology such as Class, Object, Method(function), Method Call, Variable Declaration.

Do exercise as follows: Make method Sum to include a WHILE loop. The method will take one parameter and calculate the sum up to that number.
For example, if you pass 5, it it will calculate 1+2+3+4+5 and will return it back to main() method. Main method should print a sum.

Assignment #2: make another method: Factorial that calculates a Product of same numbers, that Sum does for summing them up.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Make method sum to include a while looppay attention on
Reference No:- TGS02361075

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)