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
An option button is a square button that enables you to make one choice among two or more options.
zmey [24]
The answer is A I think
5 0
4 years ago
Im new what are points
Nesterboy [21]

You earn points to ask questions, the higher your level the more you can hold I'm guessing

8 0
3 years ago
Read 2 more answers
Which of the following activities are performed by computer programmers? Choose all that apply.
AleksAgata [21]

Answer:

- They write step by step instructions for a computer to follow.

- They create a logic problem that the computer program can solve.

3 0
3 years ago
Only the root user can modify a file that has the immutable attribute set.
Vladimir79 [104]
False if the roots modify it’s capable of it’s attributed set
8 0
2 years ago
Security attacks are classified as either passive or aggressive. True or false
kogti [31]

Answer:

false is the answer okkkkkkkkkkkkkkkk

3 0
3 years ago
Other questions:
  • What was the name of the first computer (machine) language?
    5·2 answers
  • Protected base class members cannot be accessed by: a.friends of the base class.
    6·1 answer
  • Which of the following is a typical concern for developers while using prototypes?
    6·2 answers
  • You csn access various sites on the www by using hyperlinks or by
    7·1 answer
  • True or False (1 point each)
    9·1 answer
  • Which of the following are common data types? Check all that apply.
    6·1 answer
  • Sarah has entered data about football players from team A and team B in a worksheet. She enters names of players from team A wit
    9·2 answers
  • How many passes will it take to find the 20 in this list? (python)
    11·2 answers
  • Which of the following is NOT an example of one of the six primary ways businesses use the Internet?
    10·2 answers
  • Subscribe to Markiplier
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!