-Write a program that simulates the rolling of dice and displaying how many times each number is rolled. Any code in java or c++ with methods :
-write the rollDice method, saving the results in the array declared above.
The rollDice method simulates rolling numberOfDice with numberOfSides the numberOfRolls times.The method doesn't return anything.
int numberOfRolls - the number of times the dice are to be rolled.
int numberOfSides - the number of sides for each die.
int numberOfDice - the number of dice to be rolled.
-Write the getResults method that builds a String with the results stored in the array from the last simulation. The method does not need parameters.If the array is null, which means getResults was called before rollDice, then assign an error message to the return String.The getResults method builds a String showing the results of the simulation.
return - the String containing the results of the simulation.