Write the method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclusive, and sets its side length to a random decimal number greater than or equal to 5 and less than 12. Use Math.random() to generate random numbers.
This method must be called randomize() and it must take an RegularPolygon parameter.
call the method in the program's main method so that it can test whether it works, but you must remove or comment out the main method.
https://amooc.github.io/edhesiveshapes/
Comments
Leave a comment