Write a method that takes a RegularPolygon as a parameter, sets its number of sides to a random integer between 10 and 20 inclusive, 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:

Answers

Answer 1

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.


Related Questions

what key do I use to start my presentation

Answers

Answer:

The answer to this question is given below in this explanation section.

Explanation:

Knowing how o start a presentation is crucial if you fail to capture the audience attention right of the bat your entire presentation will flop.Few listeners will stick with you to the end and retain what you have told.

That is mildly unpleasant when you are doing an in house presentation in front of your colleagues.But can become utterly embrassing when you are presenting in front of larger audience presentation to prospective customers.

Let you have most of your presentation slides and polished up you dont check and quick and effective power point presentation design tips.Many ideas are broken into bits sized statements for your slides and complemented with visuals.The best way is to appeal and invoke certain emotions with your audience curiosity,surprise fear or good old amusements.

please help i will give brainliest if right

Which elements are part of the Outlook interface? Check all that apply.

Ribbon
Quick Access Toolbar
Comments Box
Reading Pane
Formula Bar
Command Groups

Answers

Answer:

Ribbon, Quick Access Toolbar, Reading Pane, Command Groups

Explanation:

I did it on edge 2021

The elements which are part of the Outlook interface include ribbon, quick access toolbar, reading pane, and command groups. Therefore, the correct options are A, B, D, and F.

What is Outlook interface?

Outlook Main Interface is the folder pane. Outlook interface usually displays on the left hand side of the screen, and it helps in the Outlook users to switch to different folders and different views in the operating system such as mails, calendar, people, task, notes and all folders.

Basic features of Outlook interface include email service, email search, flagging, and color coding, along with the preview pane options. The calendar function enables scheduling, viewing, and communicating about the different appointments and meetings.

The main elements of the Outlook window include the ribbon, Quick Access Toolbar, Reading Pane, Command Groups.

Therefore, the correct options are A, B, D, and F.

Learn more about Outlook interface here:

https://brainly.com/question/19018627

#SPJ2

PLEASE HELP ME !!!!!!!!

Answers

Answer:

This is way to long

Explanation:

Which of these causes problems because it causes all words to have the same shape?

using left-aligned text
using all uppercase text
putting two spaces after a period
using an image instead of text

Answers

Answer:

using probably all uppercase

Explanation:

because the person will more likely think your yelling at them

but maybe even left - aligned text

Justice wrote a program and forgot to put the steps in the correct order. Which step does she need to review?

Planning
Filtering
Ordering
Sequencing

Answers

Answer: Sequencing

Explanation: I did test!

Sequencing step does she need to review.

What is Sequencing?

Sequencing is the act of placing a process's phases in order from start to finish. It is a crucial ability that is employed in math, physics, and other subject areas in addition to reading comprehension.

Look at a few sequence structures that can be used to structure instructions in a passage.

Students simply arrange a series of stages in a process or method in the proper order as part of sequencing activities. They might include topics like how to assemble equipment, set up and name a word processing file, or install an electrical switch.

Therefore, Sequencing step does she need to review.

To learn more about Sequencing, refer to the link:

https://brainly.com/question/30586864

#SPJ3

Decision support systems help managers use structured data to identify problems and find solutions to business-related problems. The financial management system is an example of this system.

Answers

Answer:

sorry about this

Explanation:

Someone plz answer my question!!
There are infinite black and white dots on a plane. What is the distance between one black dot and one white dot?​ If you get it right I will give you the crown!!!!!​

Answers

Answer:

infinite I know I got it right so might as well give me brainliest :)

Explanation:

Is this good enought to record and edit in 4k UHD? (Ultra High Definition)

Answers

Answer:

It should be, yes

Explanation:

It is yes in my opinion at least so b is the answer

if you were any type of fnaf charater who would you be and why?

Answers

Answer:

Foxy

Explanation:

Cause he's cool and he's my favorite.

what is main function of processing unit?

Answers

Answer:

to control the operation of all part of the computer.

hope it helps.

Answer:

to control the operations of the computer

Explanation:

hope it's help you have a great day keep smiling be happy stay safe ☺

What are three ways that functions can be useful when you are writing programs

Answers

Answer:

Reduces the overall complexity of your program

Allows you to easily call a function from different parts of your program after defining it.

Helps break a problem into logical chunks

Explanation:

In a computer language, a function is the set of instructions that are made for reducing the need to repeat a large amount of data by breaking it into small chunks of codes and giving concise readable human names.

They thus help in reducing the complexity in writing and maintaining the program, Hence they help in breaking it into logical chunks. They can be useful in increasing the reusability of the code. Can be used as a good alternative. Perform a single high-level task.

Learn more about the three ways that functions can be useful when.

brainly.com/question/13728820.

Which statement best describes what a project manager controls

Answers

Project controls are processes for gathering and analyzing project data to keep costs and schedules on track. The functions of project controls include initiating, planning, monitoring and controlling, communicating, and closing out project costs and schedule.

The delegation of responsibilities in a project is a project manager controls. Hence, option D is correct.

What is delegation of responsibilities?

Transferring accountability for particular tasks from one person to another is referred to as delegation. From a managerial standpoint, delegation happens when a manager gives their staff members particular tasks to do.

The manager can distribute authority, but responsibility and accountability cannot, according to the idea of absolute responsibility. Both the tasks that the manager has delegated to his subordinates and the actions of his subordinates fall under his purview of accountability to his own superior.

Effective delegation helps you and your team become better leaders and professionals, frees up time, gets you ready to manage bigger teams, and motivates team members to work harder. A crucial managerial skill to develop throughout your career is delegation.

Thus, option D is correct.

For more information about delegation of responsibilities, click here:

https://brainly.com/question/14875204

#SPJ5

The options were missing-

the overall choice of which work becomes a project

the overall deadline when a project is due

the overall resources allocated for a project

the delegation of responsibilities in a project

PLS HELP ;CC
The "Rule of Thirds" is compositional technique that was incorporated into photography from __________ .

a
early photographers who were first painters

b
early camera makers who found it was easy to explain to amateur photographers

c
early photo printers who used it and later it became a common rule

d
early SMPTE standards

Answers

Answer:

a

early photographers who were first painters

Explanation:

The Rule of Thirds is a compositional technique which states that image painting, photograph, graphic design should be divided into nine equally proportioned boxes by creating a grid with two vertical and two horizontal lines. The rule of third helps in making the picture more attractive and balanced

The rule of thirds was first used in landscape paintings by painters as early as 1797.

you are a bank loan officer. carter has to come into your office and applied for a loan for a car.you ran his credit report, and his score is 541. What will you say to carter?

Answers

Answer:

Carter score falls within the range of scores, from 300 to 579, considered Very Poor. Score is significantly below the average credit score.

Explanation:

Dr. Wayne is trying to developing techniques to cure Parkinson’s disease by inserting genetic material into patients’ cells to counteract defective genes. This type of treatment is called

.

Answers

I think it called gene therapy

Answer:

gene therapy

Explanation:

It is correct. I just did it


What does an effect allow you to do in
EarSketch?

Answers

Answer:usbebdos did did I’d did d

Explanation:

Bash six ska over five. I did a sis a and

please help which one is the right symbol?​

Answers

Answer:

second one >

hope it helps.

pleasee help meeeeeeeeee I’m stuckk!!!!

Answers

Answer: Charles Babbage

Answer:

a

Explanation:

trust

How do you describe packet switching in your own words

Answers

Answer:

this is your answer bhaiya

create a flowchart to print numbers from 1 to 100
( IF U ANSWER PROPERLY I WILL MARK U AS BRAINLIEST)

Answers

Answer:

brainliest plsss

Explanation:

I think so this is what you had asked!!!!!!

hope it helps

Use the code above to write a program that when run, draws 1000 points
at random locations on a frame as it runs. For an added challenge, have
the 1000 points be in different, random colors.
Can someone actually write code for this pleaseee (IN PYTHON OR EDHESIVE)

Answers

Answer: This is what worked for me

Explanation:

The program is an illustration of frames in Python:

Frames are part of what makes up a graphic user interface program.

The missing code segment in Python, where comments are used to explain each line is as follows:

#This defines the draw handler method

def draw_handler(canvas):

   #This imports the random module  

   import random

   #This generates a random number between 0 and 1000

   randNum=random.randint(0,1000)

   #This following iteration is repeated

   for r in range (600,600):

        #This sets the rgb color code to the random number

        r = randNum; g = randNum; b = randNum

        #This gets the color code

        randRGBcolor = "RGB(" + str(r) + "," + str(b) + ")"

        #This draws the points

        canvas.draw_point([x, x],(randRGBcolor))

At the end of the program, the 1000 points are displayed on the screen

Read more about similar programs at:

https://brainly.com/question/14068778

In one sentence, how would you sum up the internet?

Answers

Answer:

an informational system

Explanation:

A source to get information from.

KAPWING Video Editing Software allows you to use existing You Tube Videos in your design.

Answers

Answer:

Yea it should, it depends are you using a phone or a PC? because most of the time internally built in editing software on computers is better.

a file that serves as a starting point for a new document

Answers

Answer:

The appropriate response is "Template".

Explanation:

A template would be a document that might open new opportunities for such a new folder. Because once you launch a framework, that's already pre-formatted sometimes in a manner. This same template will indeed presumably have such identification and phone number environment throughout the upper left, a person receiving identify location somewhat below something on the opposite side, a response body location further below, as well as a signature, identify at either the lower part.

What are a few ways to format the text in a mail message in Outlook? Check all that apply.
Attach a file to the message to be opened separately.
Open the Font dialog box to access more detailed options.
Increase or decrease the indent.
Copy and paste text from a Word document
Use the Mini Toolbar to change the font appearance.
Click the Format Painter to paste a saved font format.

Answers

Answer:

The answers are b,c,d,e,f

Explanation:

. Which of the following are container elements?

a. bold b. underline c. italics d. all of these

Answers

It’s c cba to explain

Answer:

I think letter b. underline, but not sure

Amy wants to make an exact replica of a specific area in an image. Which tool Amy will use?

Answers

Answer:

Explanation:

.

7.5 Code practice Plz answer ASAP

Answers

def calculate_GPA(grade, weight):

   grades = {"A": 4, "B": 3, "C": 2, "D": 1, "F": 0}

   if weight == 0:

       return grades[grade]

   else:

       return grades[grade] + 1

classes = int(input("How many Classes are you taking? "))

total = 0

for x in range(classes):

   letter = input("Enter your Letter Grade: ")

   user_weight = int(input("Is it weighted? (1 = yes) "))

   grade = calculate_GPA(letter, user_weight)

   total += grade

   print("Your GPA score is: ", grade)

print("Your weighted GPA is a",(total/classes))

I wrote my code in python 3.8. I was able to replicate the output in your picture exactly. If you need me to make any changes, I'll do my best.

The function is an illustration of for loops

For loops are used to perform repetitive operations; just like the while loop

The program in Python, where comments are used to explain each line is as follows:

#This defines the studentGPA function

def studentGPA(grade, weight):

   #This initializes a dictionary for all grades

   allGrade = {"A": 4, "B": 3, "C": 2, "D": 1, "F": 0}

   #This sets the return grade to 0

   retValue = 0

   #If the grade is valid

   if grade in allGrade:

       #If the weight is 0

       if weight == 0:

           #Then score is not graded

           retValue = allGrade[grade]

       #If otherwise

       else:

           #This adds 1 to the return grade

           retValue = allGrade[grade]+1

   #This returns the grade point

   return retValue

#The main begins here    

#This gets the number of classes

klass = int(input("How many Classes are you taking? "))

#This initializes the total grade to 0

total = 0

#This following is repeated for each class

for x in range(klass):

   #This gets input for the letter grade

   letterGrade = input("Enter your Letter Grade: ")

   #This gets input for the weight

   weight = int(input("Is it weighted? (1 = yes) "))

   #This gets the corresponding grade

   grade = studentGPA(letterGrade, weight)

   #This prints the grade point

   print("Your GPA score is: ", grade)

   #This calculates the total grade

   total += grade

#This calculates the GPA

GPA = total/klass

#This prints the GPA

print("Your weighted GPA is a",GPA)

Read more about for loop at:

https://brainly.com/question/12736327

what is a computer vhdvsidegvjks

Answers

Answer:

i'm using a computer to answer this question rn

Explanation:

vhdvsidegvjks

I REALLY Need help on this.

Answers

Make a deposit talk to A representative transfer money and Check account balance
Other Questions
Change these times to the 24-hour clock.c)8:15 pmd)midnight Describe the graph of the equation y = 0. Is the equation a function?A. horizontal line; noB. horizontal line; yesC. vertical line; noD. vertical line; yes HELP ASAPJoe is experimenting to determine which liquid will cause bean plants to grow faster. He watered the plants with equal amounts of liquid and measured their height every other day. The plants are in the same pots with different soils and placed in the same location. Will Joe be able to obtain reliable data to write a supported conclusion?Yes, because he is only observing the height of the plant.Yes, because he is consistent with watering the plants.No, because he used different soils.No, because he uses only one type of plant. 5/7(14-21x)=115what is the answer? Bam hi cuts between what bases An equation is shown. What is the value of 12x that makes the equation true? 12x + 4x = 15/2 + 4xpls halp what is the difference between a snap judgement and evaluation? what belief is common to judaism, chrisitanity , and islam Which are the steps in the process of creating a database Choose the best Spanish equivalent to the phrase. The car is far away from the park. El carro est lejos del parque. El carro est lejos al parque. El carro est lejos de el parque. El carro est cerca del parque. In QRS, the measure of S=90, the measure of Q=54, and RS = 26 feet. Find the length of QR to the nearest tenth of a foot Pls help 25 only and brainlist Why did the United States decide to remain neutral and not get involved in the war between France and Britain?They had problems in the Louisiana Territory and were battling Choctaw in New Orleans.They were a new nation and still recovering from the revolution against Britain.They planned to enact an embargo against both countries and were not willing to choose sides.They wanted to retain access to the ports of both countries along the Mississippi River. Jasmine sold half of her Barbie doll Collectionand then bought 9 dolls. She now has 13 dolls.Barbie dolls did she begin with?How many "Consider a C corporation. The corporation earns $2.5 per share before taxes. After the corporation has paid its corresponding taxes, it will distribute 50% of its earnings to its shareholders as a dividend. The corporate tax rate is 30%, the tax rate on dividend income is 20%, and the personal income tax rate is set at 28%. What are the shareholders earnings from the corporation after all corresponding taxes are paid 1.Which sentence has an inappropriate shift in number?A.The soccer players were thrilled when they won the local tournament.B.When people enter a theater late, they should find their seats quickly.C.When Jacob is having a bad day, they talk about it with a friend.D.Children can make new friends when they join a club or sports team. Which sentence has an inappropriate shift in person?A.I like going to cooking class because I get to try new, unfamiliar dishes.B.When I visited my aunt's farm, you could hear crickets chirping at night.C.They were unhappy about the new rule, but they agreed to follow it.D.When my dad was young, children spent more time outside than they do today. 2.Read the sentence containing a pronoun shift error.Joe and Lucy presented his science project to the school.Which sentence corrects the error? A.Joe and Lucy presented its science project to the school.B.Joe and Lucy presented your science project to the school.C.Joe and Lucy presented her science project to the school.D.Joe and Lucy presented their science project to the school. 3.Read the sentence containing a pronoun shift error.When my dad was a kid, you played outside until the street lights came on.Which sentence corrects the error?A.When my dad was a kid, we played outside until the street lights came on.B.When my dad was a kid, they played outside until the street lights came on.C.When my dad was a kid, I played outside until the street lights came on.D.When my dad was a kid, he played outside until the street lights came on. 4.Read the sentence containing a pronoun shift error. When a baseball player practices, they go to the batting cage everyday.Which sentence corrects the error? A.When a baseball player practices, we go to the batting cage everyday.B.When a baseball player practices, he goes to the batting cage everyday.C.When a baseball player practices, it goes to the batting cage everyday.D.When a baseball player practices, you go to the batting cage everyday. 14.976 divided by 6 with remainder Which statement accurately describes runners?A runner is a small underground stem that sprouts new buds.A runner is a series of underground leaves that contain stored food.A runner is a horizontal stem that grows along the ground.A runner is a horizontal stem that grows underground. Describe the difference between sociology and psychology.will mark you brainliest :) The cost of purchasing gasoline varies directly with the number of gallons purchased. Kali paid $52.90 for 23 gallons of gas. What is the direct variation equation that relates y, the cost of a gasoline purchase, to x the number of gallons?