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
Assume a future where security counter measures against DoS attacks are much more widely implemented than at present. In this fu
Amiraneli [1.4K]

Answer:

yes administrators have to be concerned

Explanation:

It is necessary for countermeasures to be taken against DoS attacks

The types of attacks that can still occur are:

If the network connection get to be overloaded,  there could be flash crown of this computer system and fraudulent activities maybe initiated. By flash crowd  we mean that the there is a great deal of traffic on the system and this could cause the network connection to be destroyed.

To reduce the impact of this kind of attacks,

1. there should be enough or excess network bandwidth  and distributed servers should be replicated if there is a possibility that network could get to be overloaded.

2. restriction is more commonly done on sporting sites. Restriction brings about an increase in implementation cost.

3. The impact of this type of attack can be reduced by stopping unwanted traffic throught the implementation of filters

4. Use strong antivirus on computer sytems that are used to connect to the internet

7 0
3 years ago
Distinguish between engineering and architecture​
Liula [17]

difference between engineering and architecture are.

A engineer is a person whose job involves designing and building engines, machines, roads, bridges ,etc .

While architect design buildings only.

3 0
3 years ago
________ is a process where authentication and permission will be passed on from one system to another, usually across multiple
hoa [83]

Answer: Federation

Explanation:

In multiple enterprises there are number of authentication processes to access resources and information so in order to avoid a large number of authentications we have a process called federation whereby all the authentication and authorization processes are passes from one system to the other within the enterprise.

3 0
3 years ago
A hidden backlog contains the projects that the IT department is not aware of because of low feasibility.
Finger [1]

Answer: True

Explanation:

Yes, the given statement is true that the due to the very low feasibility the IT (Information technology) department are not aware of the hidden backlog that basically contain projects.

The feasibility is the main factor in the IT department as it helps to study whole objective of the project and then also uncover all the strength and weakness of the project so that we can easily go through the details to make the project more efficient and reliable.

8 0
3 years ago
For python how do I ask the user how many numbers they want to enter and then at the ending add those numbers up together?
Digiron [165]

I am not too familiar with the Python language, but the algorithm would be something like this:

1. create a variable for the sums of the number

2. read in how many numbers the user wants to enter (let's call it N)

and then create a for loop:

for N times

read in the next number

increase the sum variable by that number

Hopefully this helps!

8 0
3 years ago
Other questions:
  • In the database below, the arrow is pointing to a _____.<br> file<br> record<br> field<br> key field
    12·1 answer
  • Olivia wants to add buttons and clickable features to her website. Which language should she use?
    10·2 answers
  • What is authentication?
    8·1 answer
  • If your network subnet mask is /16, what is the maximum number of host ids available for this network?
    15·1 answer
  • What kind of value should an employee possess when employees are expected to be responsible and fair?
    7·1 answer
  • If we can lock a file, we can solve the race condition problem by locking a file during the check-and-use window, because no oth
    14·1 answer
  • I CANT DO SKIN MODS ON BRAWLHALLA RIGHT!!!! IM SO MADDDDDDDDDDD
    11·1 answer
  • You have this code in your program.
    7·1 answer
  • Give three general reasons for the importance of computer networking.
    9·1 answer
  • A Network Intrusion Detection System watches for potentially malicious traffic and _______ when it detects an attack.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!