1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
pogonyaev
3 years ago
10

Write a method that takes a Regular Polygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclu

sive, 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 a Regular Polygon perimeter.
Computers and Technology
1 answer:
Fantom [35]3 years ago
8 0

Answer:

Answered below

Explanation:

//Program is written in Java programming language

Class RegularPolygon{

int sides = 0;

int length = 0;

}

public void randomize(RegularPolygon polygon){

int randomSides = (int) 10 + (Math.random() * 20);

double randomLength = 5 + (Math.random() * 11);

polygon.sides = randomSides;

polygon.length = randomLength;

}

You might be interested in
When widgets, or portable chunks of code, are embedded on html pages and thereby help increase the functionality of those pages,
Anna11 [10]
<span>When widgets, or portable chunks of code, are embedded on html pages and thereby help increase the functionality of those pages, consumers embrace one of the greatest virtues of social media known as Collaboration.</span>
5 0
3 years ago
Materials such as copper, silver, and aluminum through which electric energy passes freely are called
nasty-shy [4]
These materials are called conductors
6 0
3 years ago
Which of the following is the MOST important consideration when planning your budget?
Sladkaya [172]
C.budget for fixed expenses before flexiable expenses 

3 0
3 years ago
Read 2 more answers
Write a c++ to read seven days in an array and print it
shepuryov [24]

Explanation:

Photosynthesis, the process by which green plants and certain other organisms transform light energy into chemical energy. During photosynthesis in green plants, light energy is captured and used to convert water, carbon dioxide, and minerals into oxygen and energy-rich organic compounds.

6 0
2 years ago
7. What information appears on the vertical axis?
ivann1987 [24]

Answer: range of values

Explanation:

3 0
3 years ago
Other questions:
  • A _________ is a series of commands and instructions that you group together as a single command to accomplish a task automatica
    15·1 answer
  • Everfi module 7 answers
    6·1 answer
  • In a social networking site your personal information is listed under your?
    12·2 answers
  • Describe safe motherhood​
    9·2 answers
  • A combination lock has the following basic properties:
    10·1 answer
  • Which of the following is most likely to include technical vocabulary?
    7·1 answer
  • I need help under standing an assignment, I've contacted my teacher but I want to finish this class already. Here's the directio
    11·1 answer
  • ONlY OnE pErcEnT oF pEOpLe CaN sOlvE tHiS!
    7·2 answers
  • What technical was the microscope invented in?
    6·1 answer
  • How was data put into the Tabulating Machine?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!