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
Harman [31]
3 years ago
8

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.
Computers and Technology
1 answer:
Sergio [31]3 years ago
5 0

Answer:

import java.lang.Object

import java.lang.Math

public class RegularPolygon  extends java.lang.Object{

  public void randomize(RegularPolygon c){

       int min = 10, max1 = 20;

       double  min1 = 5, max1 = 12;

       double range = (max - min) + 1;

       double range1 = (max1 -min1) + 1

       int side = (Math.random() * range) + min;

       double len = (Math.random() * range1) + min1;

       c.setNumSides(side);

       c.setSideLength( len);

 }

 public static void main(String[] args) {

    RegularPolygon r = new RegularPloygon();

    randomize(r);

 }

}

Explanation:

The randomize method accepts a regular polygon class as its only parameter and assigns a random number of sides and the length of these sides with the 'Math.random' function.

You might be interested in
If you want to learn more about a command, point to its button and wait for the ____ to appear.
Pani-rosa [81]

Answer:

The answer to this question is "Screen Tip".

Explanation:

In the operating system, there are many software. In this software, there is an option of the screen tip. screen tip is a small window that displays detailed text.

For example :  

If we start a paint software and we point the mouse on the pencil tool it display the detail of that tool like "Draw free-from line with a selected line width".

7 0
3 years ago
True / False<br> The architecture of a computer determines its machine language.
ozzi

Answer: True

Explanation:

The architecture of the computer determine the processor and it determines whether we will have fixed length instructions or variable length instructions.

We have CISC and RISC architectures which uses different types of instructions and the data are processes in different machine languages.

6 0
3 years ago
__________ is a network project that preceded the internet.
suter [353]
Arpanet. I think is the answer.
8 0
3 years ago
The ________ is a device that converts digital computer signals into analog signals so that they can be sent over a telephone li
Anastaziya [24]
<span>The modem is a device that converts digital computer signals into analog signals so that they can be sent over a telephone line.</span>
5 0
3 years ago
an error message is displayed during windws startup about a service that has failed to start, and then the system locks up. You
Tanzania [10]

Answer:

1:-Launch Windows RE and perform a Start Repair.

2:- Until you pick the Last Documented Successful Configuration on the Advanced Boot Options menu are the correct answer of this question.

Explanation:

Technology company Rescue is a Software restore tool capable of fixing some device issues that can prevent Microsoft for operating. Install Repair checks your Computer for the problem and then attempts to fix it, so that your Computer can start properly.

The Enhanced Boot Preferences app lets you connect to the internet in advanced mode for troubleshooting.

4 0
4 years ago
Other questions:
  • Which fingers do you use to type the following letters rtgvf
    11·1 answer
  • Acme Parts runs a small factory and employs workers who are paid one of three hourly rates depending on their shift: first shift
    5·1 answer
  • 1) What is Net beans
    6·1 answer
  • All windows on the desktop have width and height (as well as numerous other attributes). However the actual contents of the wind
    13·1 answer
  • What is microsoft access?
    14·1 answer
  • Why laptop computer is called micro computer?​
    8·1 answer
  • ____ is a website that checks a submitted paper and then determines how much of the paper is unoriginal.
    12·1 answer
  • What is a feature of audio editing software
    11·1 answer
  • Computer memory uses different numbers of bytes to store different data types.
    7·1 answer
  • You want to make access to files easier for your users. Currently, files are stored on several NTFS volumes such as the C:, D:,
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!