Answered step by step
Verified Expert Solution
Question
1 Approved Answer
InstructionS'sEpi Write a method that takes a Rectangle as a parameter, sets its length to a random, even integer between 10 and 20 inclusive, and
InstructionS'sEpi Write a method that takes a Rectangle as a parameter, sets its length to a random, even integer between 10 and 20 inclusive, and sets its width to a random, odd integer greater than or equal to 7 and less than 14. Use (Math. random() to generate random numbers. This method must be called (randomize() and it must take a Rectangle 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 testing. Math" as this is required to check your code for a score. To reference the documentation for the Rectangle class, click here. KY Files STATUS NOT SUBMITTED SAVE SUBMIT INSTRUCTIONS RUN CODE GRADING HISTORY * Lesson 3 Coding Activity Question 2 */ INP U5_L3_Activity_Two.java import java . util . Scanner; Write a method that takes a import shapes.*; Rectangle as a parameter, sets its VOUSW import testing. Math; length to a random, even integer public class U5_L3_Activity_Two between 10 and 20 inclusive, and 8 a sets its width to a random, odd
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started