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
Windows _____ is a system notification utility and gives quick access to settings for items like screen brightness and network c
jasenka [17]

Answer:

Windows notification and action settings

Explanation:

Notification and action settings is a system settings as well as a notification utility that enables quick or easy access to settings for a number of items or features.

The items include network, tablet mode, mobile hotpot, night light, brightness, Bluetooth, airplane mode, all settings, VPN, focus assist, location, project and connect. It is important to note that all the listed items can be found in the notification and action settings of a windows 10 computer.

4 0
3 years ago
Some Tiny College staff employees are information technology (IT) personnel.
const2013 [10]
xndnxbxnndndndnndnxndnnxndndnndndndnndndndndndnndnxnx
5 0
3 years ago
Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal
Ket [755]

Answer:

The complete Matlab code along with step by step explanation is provided below.

Matlab Code:

function Req=ParallelR(Number)

Number=input('Please enter the number of resistors: ');

if Number>10 | Number<=0

   disp('Invalid input')

return

end

R=0;

for i=1:Number

r=input('Please enter the value of resistor: ');

R=R+1/r;

end

Req=1/R;

end

Explanation:

Parallel resistance is given by

\frac{1}{Req} = \frac{1}{R_{1}} + \frac{1}{R_{2}} + \frac{1}{R_{3}}...+\frac{1}{R_{N}}

First we get the input from the user for how many parallel resistors he want to calculate the resistance.

Then we check whether the user has entered correct number of resistors or not that is from 1 to 10 inclusive.

Then we run a for loop to get the resistance values of individual resistors.

Then we calculated the parallel resistance and keep on adding the resistance for N number of resistors.

Output:

Test 1:

Please enter the number of resistors: 3

Please enter the value of resistor: 10

Please enter the value of resistor: 20

Please enter the value of resistor: 30

ans =       60/11

Test 2:

Please enter the number of resistors: 11

Invalid input

Test 3:

Please enter the number of resistors: 0

Invalid input

8 0
3 years ago
This unit is used to print the picture on a paper
NeTakaya

Answer:a printer

Explanation:

It prints things

7 0
3 years ago
If you are going to attach more than 15 devices to your wireless network, you should make sure your router supports which standa
Westkost [7]

Answer:

802.11ac

Explanation:

It is a wireless networking standard.It functions only on 5 Ghz only. 802.11ac has three times the bandwidth of 802.11n hence it can handle more number of users.It has multi-link throughput of 1 gigabit per second.It provides high throughput.It is very useful for environments with high user density.

3 0
3 years ago
Other questions:
  • What is a way to Procter your social security number and other sensitive information from identity theft
    9·1 answer
  • When you move a paragraph in a document that includes text with a footnote, what happens to the footnote reference?
    7·2 answers
  • i got a set of headphones and when i plug them into my speakers the right side only works how do i fix the left side of them
    12·1 answer
  • __________ refers to rules, statutes, codes, and regulations established to provide a legal framework within which business may
    13·1 answer
  • . What type of device is a computer? Where does it use?​
    14·1 answer
  • Write an algorithm that receives a number from the user (you can store the number in a variable called N). Then the algorithm sh
    8·1 answer
  • Ohanians “great big secret” is that:
    8·1 answer
  • In this lab, your task is to complete the following: Enable all of the necessary ports on each networking device that will allow
    9·1 answer
  • Why people shouldnt get married​
    6·1 answer
  • Please help I need help with web technology I forgot to post the question in the last one. here it is tho.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!