Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

STATUS NOT SUBMITTED V= Files SAVE SUBMIT INSTRUCTIONS RUN CODE GRADING HISTORY * Lesson 3 Coding Activity Question 2 */ NP U5_L3_Activity_Two.java RUN CODE CLEAR

image text in transcribedimage text in transcribed
STATUS NOT SUBMITTED V= Files SAVE SUBMIT INSTRUCTIONS RUN CODE GRADING HISTORY * Lesson 3 Coding Activity Question 2 */ NP U5_L3_Activity_Two.java RUN CODE CLEAR STOP 3 - import java . util . Scanner; 4 import shapes.*; UT import testing. Math; 6 ERROR 7 public class U5_L3_Activity_Two 8 7 /tmp/sub- 9 10 /* Add the method randomize here */ 3731996022/U5_L3_Activity_ 11 Two.java:20: error: cannot find 12 // You can uncomment and add to the main method to test your code symbol 13 / You will need to remove/ comment out this method before re.setlength(10+((int) submitting your code (Math.random()*6))* 2); 14 15 public static void main(String args) { 16 symbol: method setlength(int) 17 location: variable re of type 18 19 Rectangle /tmp/sub- 3731996022/U5_L3_Activity_ Two.java:24: error: cannot find symbol randomize r; symbol: class randomize location: class U5_L3_Activity_Two /tmp/sub- 3731996022/U5_L3_Activity_ Two.java:24: error: variable r is already defined in method main(String/7)Classwork for M X = [Template] Sea X O The ghi nho: A| X $ Unit 5: Lesson X Search Results X O The ghi nho: U X G project stem ul X + V X CD courses.projectstem.org/courses/64281/assignments/9404619?module_item_id=17988876 M Gmail YouTube Maps Translate G Google Due No Due Date TOIts SubmitIng an external LOOT PROJECT SY 2022-23 STEM Home Instructions Modules Account Grades Write a method that takes a RegularPolygon as a parameter, and changes the number of sides so it becomes an equilateral triangle (i.e. set the number of sides to 3). Quizzes Dashboard This method must be called (makeEqTriangle() and it must take a RegularPolygon as a parameter. Forum You can call your method in the program's main method so you can test whether it works, but you must remove or Courses Help comment out the main method before checking your code for a score. For example, if the following code appeared in your main method: Calendar RegularPolygon poly = new RegularPolygon(4, 4) ; makeEqTriangle(poly) ; System. out . printIn(poly) ; Inbox Your code would output the following: History equilateral triangle with side length 4.0 ? To reference the documentation for the RegularPolygon class, click here. Help K A NAT CLIPMITTED CAVE SUBMIT VE % Type here to search O E 231OF ENG 12:56 AM US 11/29/2022

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions