Exercise for reference variable and for static array

Program's goal: Create an array of 5 dice. Get the dice with random numbers. Sum the dice and print the dice and the total and the highest dice value. Constraint: The summation of the dice and the determination of the highest die needs to be done in one function. The printing must be done in the main method. Extra: sort the dice.

If the dice are 1,5,2,3,0

It will print:

1 5 2 3 0

Highest is 5

Sum is 11

 

Structure:

main method:

sum method: