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
PtichkaEL [24]
2 years ago
10

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

ive, 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 an RegularPolygon parameter.


Could someone help me out here thanks! C:
Computers and Technology
1 answer:
monitta2 years ago
8 0

Answer:

public static void randomize(RegularPolygon r){

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

   int length = (int)((12-5)  * Math.random()) + 5;

   // assuming the regularpolygon class has setSide and setLength methods.

   r.set.Side(side);

   r.setLength(length);

}

Explanation:

The randomize method is used to access and change the state of the RegularPolygon class attributes sides and length. The method accepts the class as an argument and assigns a random number of sides and length to the polygon object.

You might be interested in
Which of these is NOT one of the main parts of an email?
slega [8]
I think the answer is c
3 0
3 years ago
Read 2 more answers
In ____, data can move in both directions at the same time, such as with a telephone.
gtnhenbr [62]

The answer is d. full-duplex transmission. This communication setup allows for simultaneous transmit and receive for both parties. As signals are able to be transmitted at the same time two way for both parties, for both directions along the same data carrier medium.

4 0
3 years ago
14. In cell B14, create a formula without using a function that adds 1 to the value in cell B12 and then multiplies the result b
vagabundo [1.1K]

Answer:

The formula for the given problem is given below:

= (1+B$12)×B13

Explanation:

Immediately you do one, then you can autofill the formula to the mentioned range B15:B17 and then to C14 to H17

When been done correctly, this is how the formula will look in those cells if you do it correctly.

Check the file attached below to see it.

7 0
2 years ago
How does Technology impact any profession or occupation?
Brrunno [24]

Technology can create or dimish occupations.

Technology can also make the job easier

8 0
3 years ago
What is one benefit of Powerpoint Online?
VashaNatasha [74]

Answer:

for edge users

anyone with the url

Explanation:

6 0
3 years ago
Read 2 more answers
Other questions:
  • What is the difference between a denial-of-service attack and a distributed denial-of-service attacks? which is potentially more
    10·1 answer
  • What are words with the root gest?
    15·1 answer
  • The Internet may best be compared to a/an
    11·1 answer
  • The entirety of a packet at one Layer becoming the payload section at another is know as?
    11·2 answers
  • I have been charged for brainly plus yet I still have to watch ads why? What do I do?
    12·2 answers
  • Help plz
    10·1 answer
  • In many supermarkets customers can pay for their shopping using credit cards. (a) Name two items of information stored on the ma
    8·1 answer
  • A computer's capability of distinguishing spoken words is called?
    9·1 answer
  • How is video compression accomplished?
    10·2 answers
  • a uniform density sheet of metal is cut into a shape of an isosceles triangle, which is oriented with the base at the bottom and
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!