Write one Java program and satisfy the followingrequirements:
- Write a method called cube that accepts one integerparameter and returns that value raised to the third power.
- Write a method called randomNumber that returns arandom floating-point number in the range of [-20.0, 50.0). (hints:use Random class in the method)
- Write a method called findMax that accepts threefloating-point number as parameters and returns the largestone.(hints: use conditional statement in the method)
- Overload findMax that accepts one integer parameterrepresenting the amount, the method will read the floating-pointnumber one by one within the amount and return the largest value.(hints: use Scanner class and loop statement in the method)
5. In the main method, invoke the above methods and output theirresults.