Question: please let me what errors i made and also please show me the correct way with the same format as this Write a method that

please let me what errors i made and also please show me the correct way with the same format as this  please let me what errors i made and also please show
me the correct way with the same format as this Write a
method that takes a Regular Polygon 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

Write a method that takes a Regular Polygon 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.randon to generate random numbers. This method must be called randomize() and it must take an Regular Polygon parameter. You can call your method in the program's main method so you can test whether it works, but you must remove or comment out the main method before checking your code for a score. You will also need to make sure you do not remove the import statement "import edhesive testing. Math" as this is required to check your code for a score. To reference the documentation for the Regular Polygon class, click here RUN CODE CLEAR STOP 1 lesson 3 Coding Activity Question 2 2 3. import java.util.Scanner; 4 import edhesive.shapes." 5 import edhesive. testing. Math; 6 7. public class U5_L3_Activity Two 8 9 7. Add the method randomize here 10 - public static void randomize(Regular Polygons) { double side Length - (Math.random()*7.5); 12 double numSides (int) (Math.random() * 11 + 10); 13 Systen.out.println(nunSides); 14 2 15 16 // You can uncomment and add to the main method to test your code 17 You will need to remove comment out this method before checking your code for a score 18 19 - public static void main(String[] args) 20 21 22 23 > 24 TESTI PASS? x DESCRIPTION This test case checks that there is no main method in your submitted code and that you have imported the required edhesive testing. Math class. MESSAGE Make sure you have deleted or commented out the main method in your code and that your program has the import statement import edhesive testing.Math;' at the top. TEST 2 PASS? TEST 3 PASS? X DESCRIPTION This test case checks that your randomize method randomly changes the number of sides of the RegularPolygon parameter. MESSAGE Make sure your randomize method changes the number of sides of the RegularPolygon parameter to a random number between 10 and 20 inclusive. TEST 4 PASS? XA DESCRIPTION This test case checks that your randomize method randomly changes the side length of the RegularPolygon parameter. MESSAGE Make sure your randomize method changes the side length of the RegularPolygon parameter to a random number greater than or equal to 5 and less than 12

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!