Edhesive unit 2 lesson 5 coding activity 1 Write code which creates three regular polygons with 11, 14 and 19 sides respectively. All side lengths should be 1.0. The code should then print the three shapes, one on each line, in the order given (i.E. The one with 11 sides first and the one with 19 sides last). Sample run: regular hendecagon with side length 1.0 regular tetrakaidecagon with side length 1.0 regular enneadecagon with side length 1.0

Answers

Answer 1

Answer:

public class Polygon {

   private String name;

   private int sides;

   private double sideLength;

   public Polygon(String name, int sides, double sideLength) {

       if (sideLength <= 0) throw new IllegalArgumentException("Length cannot be zero or negative.");

       if (sides <= 0) throw new IllegalArgumentException("Sides cannot be zero or negative.");

       this.name = name;

       this.sides = sides;

       this.sideLength = sideLength;

   }

   public String getName() {

       return name;

   }

   public void setName(String name) {

       this.name = name;

   }

   public double getSideLength() {

       return sideLength;

   }

   public void setSideLength(double sideLength) {

       if (sideLength <= 0) throw new IllegalArgumentException("Length cannot be zero or negative.");

       this.sideLength = sideLength;

   }

   public int getSides() {

       return sides;

   }

   public void setSides(int sides) {

       this.sides = sides;

   }

   (use the at sign here)Override

   public String toString() {

       return "regular " + name + " with side length " + String.format("%.1f", sideLength);

   }

}

public class TestPolygon {

   public static void main(String[] args) {

       Polygon sides11 = new Polygon("hendecagon", 11, 1);

       Polygon sides14 = new Polygon("tetrakaidecagon", 14, 1);

       Polygon sides19 = new Polygon("enneadecagon", 19, 1);

       System. out. println(sides11);

       System. out. println(sides14);

       System. out. println(sides19);

   }

}

Explanation:

This java source code defines a class that creates a regular polygon based on the number of sides given to it.

Below is a screenshot of the program code and output.

Edhesive Unit 2 Lesson 5 Coding Activity 1 Write Code Which Creates Three Regular Polygons With 11, 14

Related Questions

signs and symptoms of a disease first occur during the group of answer choices acute phase latent period subclinical stage prodromal period

Answers

Signs and symptoms of a disease first occur during the Prodromal Period.

The period following incubation but before the manifestation of an infection's distinctive symptoms is known as the prodromal stage. Even at the prodromal stage, infections can still transfer from one person to another.

At this point, the infectious agent is still reproducing, which causes the body's immune response and mild, ambiguous symptoms.

An indication or signs that a physical or mental illness is developing. A prodrome frequently acts as a warning or premonitory symptom, which may, in some circumstances, allow for the performance of preventive measures.

The period of subclinical symptoms and signs that precedes the development of psychosis is known as the prodrome. Comorbid disorders are very prevalent throughout the prodromal stage, which can last anywhere from a few weeks to several years.

Learn more about Prodromal Period:

https://brainly.com/question/13051848

#SPJ4

write an algorithm to settle the following question: a bank account starts out with $10,000. interest is compounded monthly at 6 percent per year (0.5 percent per month). every month, $500 is withdrawn to meet college expenses. after how many years is the account depleted?

Answers

Using the knowledge in computational language in python it is possible to write a code that write an algorithm to settle the following question.

Writting the code:

original = float(raw_input("Enter initial balance: "))

interest = float(raw_input("Enter promised return: "))

expenses = float(raw_input("Enter monthly expenses: "))

interest = interest / 100 / 12

month = 0

balance = original

if balance * interest - expenses >= 0:

print "You don't need to worry."

else:

while balance + balance * interest - expenses >= 0: # negation of the if condition

balance = balance + interest * balance # in one month

balance = balance - expenses

month = month + 1

print month, balance

print month / 12, "years and", month % 12, "months"

See  more about python at brainly.com/question/18502436

#SPJ1

Which statement about internet marketing is MOST accurate?


A. Internet marketing is still in its infancy and rarely used.


B. Some services can be successfully promoted via internet marketing alone.


C. Internet marketing is significantly more expensive than more traditional marketing.


D. Internet marketing works well for services but not commodities.

Answers

Answer:

search this and you'll have all the answers

Marketing Midterm Quizlet

Explanation:

Why are tables a good way for displaying data

Answers

Answer:

Tables are used to organize data that is too detailed or complicated to be described adequately in the text, allowing the reader to quickly see the results.

Explanation:

please make my answer as brainelist

which statement accurately compares the Restart at 1 and Continue Numbering features of Word

Answers

Answer:

The Continue Numbering feature can be used to maintain the numbering order in a list and the Restart at 1 feature can be used to make a new list.

look at all the snow is it a fragment or sentence​

Answers

Answer: Sentence

Explanation: Because it has a subject (snow) and a predicate (look)

// todo: write a method called additem that returns a bool and takes an item parameter. // this method should iterate through the mitems array, looking for any array element // that is null. if a null item is found, it should assign that array element to the // item passed in and return true. otherwise it should return false.

Answers

A method called additem that returns a bool and takes an item parameter is given below:

The Method

public class Storage {

   private ArrayList<String> list = new ArrayList<>();

   public static final int SIZE = 10;

  public boolean addItem(String s) {

       if (isFull())

           return false;

       return list.add(s);

   }

   public String[] getItems() {

       return list.toArray(new String[list.size()]);

   }

  public boolean isFull() {

       return list.size() >= SIZE;

   }

   public boolean removeValue(String s) {

       return list.remove(s); // Removes the first occurrence of the string

   }

}

Read more about programming here:

https://brainly.com/question/23275071

#SPJ1

why do you think websites commonly require you to have at least 8 characters, and a mix of uppercase characters, lowercase characters, numbers, and symbols?

Answers

The reason why i think that  websites commonly require you to have at least 8 characters, and a mix of uppercase characters, lowercase characters, numbers, and symbols is because the combination is one that is often difficult to guess if an attacker want to access your account.

Why do passwords need to be 8 characters?

Setting a minimum password length of eight characters is one that tends to remove all three- to seven form of letter words and it is one that cannot be  easily cracked passwords.

Therefore, The reason why i think that  websites commonly require you to have at least 8 characters, and a mix of uppercase characters, lowercase characters, numbers, and symbols is because the combination is one that is often difficult to guess if an attacker want to access your account.

Learn more about websites from

https://brainly.com/question/17174600

#SPJ1

now that you’ve created a data frame, you want to find out more about how the data is organized. the data frame has hundreds of rows and lots of columns. assume the name of your data frame is flavors df. what code chunk lets you review the structure of the data frame?

Answers

A code chunk which lets you review the structure of the data frame is: A. str(flavors_df)

What is a data frame?

A data frame can be defined as a two-dimensional table or array-like structure that is made up of rows and columns, which is typically used for the storage of data in R Studio by using the R programming language.

In this scenario, "str()" refers to the function that would allow the programmer to review the structure of the data frame while "flavors_df" refers to the name of the data frame which the "str()" function will take for its argument.

Read more on data frame here: https://brainly.com/question/28209816

#SPJ1

Complete Question:

Now that you’ve created a data frame, you want to find out more about how the data is organized. The data frame has hundreds of rows and lots of columns.

Assume the name of your data frame is flavors_df. What code chunk lets you review the structure of the data frame?

str(flavors_df)

summarize(flavors_df)

select(flavors_df)

filter(flavors_df)

using the concept of defense in depth, which layers might we utilize to implement defenses to secure ourselves against someone removing confidential data from a desktop pc with a usb flash drive?

Answers

Environmental protections would need to be in place which would ensure USB threats were non-issue by using the concept of defense in depth. Provide them with work USB sticks that have automatic encryption protection instead of expecting them to find or utilise ones that have been supplied to them by others. One technique to ensure that there won't be a data breach if a USB stick is lost is to use encrypted devices.

A method known as "defence in depth" uses a variety of security measures to safeguard an organization's assets. The idea is that extra layers exist as a backup to ensure that threats are stopped along the road if one line of protection is breached.

In order to safeguard the confidentiality, integrity, and availability of a computer network and the data contained inside it, a number of security methods and controls are deliberately stacked throughout the network. This strategy is known as defence in depth (DiD).

Depending on the point of concentration, defence in depth can be divided into three control layers. These include administrative, technical, and physical controls.

Learn more about defense in depth:

https://brainly.com/question/13566507

#SPJ4

This type of boot occurs when the computer is already on and you restart it without turning off the power.

Answers

Answer:

The type of boot that occurs when the computer is already on and you restart it without turning off the power is called a Warm Boot.

The type of boot that occurs when the computer is already on and you restart it without turning off the power is called a Warm Boot or a Soft Boot.

During a warm boot or soft boot, the computer's operating system is restarted, allowing it to reload and refresh system processes and services. Unlike a cold boot, a warm boot does not involve powering off and on the computer's hardware.

Therefore, The type of boot that occurs when the computer is already on and you restart it without turning off the power is called a Warm Boot or a Soft Boot.

To know more about the Warm Boot:

https://brainly.com/question/32364841

#SPJ4

Embedded computers usually are small and have limited hardware but enhance the capabilities of everyday devices. True or false?.

Answers

Embedded computers usually are small and have limited hardware but enhance the capabilities of everyday devices is a True statement.

Are embedded computers small?

Embedded computers are known to be machine that is said to be in smaller form  of their factor motherboards. An example is Mini-ITX .

Note that there are lot of Different forms of  embedded computers that has their specific innovative enclosure designs.

Therefore, based on the above, Embedded computers usually are small and have limited hardware but enhance the capabilities of everyday devices is a True statement.

Learn more about Embedded computers  from

https://brainly.com/question/9706390

#SPJ1

Read the sentence. then answer the question that follows. the child's antipathy towards broccoli was clear; she held her nose and gagged every time it was present on her plate. using the inference context clue provided, what does antipathy most nearly mean in this sentence? ambition comfort dislike support

Answers

The inference is that the meaning of antipathy in this sentence is C. Dislike.

How do you explain inference?

In literature, the inference has to do with the deduction that readers can make based on the information that the author gives. It should be noted the words that are used by authors are used to convey a particular meaning in the poem.

From the information given, it was stated that the child has an antipathy towards broccoli. It should be noted that when one had an antipathy towards something, it means that the person doesn't like that particular thing.

It should be noted that antipathy simply means the dislike for a particular thing.

Therefore, inference is that the meaning of antipathy in this sentence is Dislike. It means that the child doesn't like broccoli.

Therefore, based on the information given, the correct option to the question will be C.

Learn more about inference on:

brainly.com/question/25280941

#SPJ1

Answer:

Dislike

Explanation:

The student printed the information from the American Medical Association because:

Answers

The student printed the information from the American Medical Association due to the fact that It is one that has a lot of authority than the other websites and It is one that is seen to contain more objective than the other  kind of websites.

Why do that from American Medical Association ?

There can be a lot of reasons for the student action. The student may have printed information from AMA (American Medical Association) due to the fact that  the site  is a genuine source and had a lot of information which concludes the reason for it having a lot of  authority over other websites.

Therefore, The student printed the information from the American Medical Association due to the fact that It is one that has a lot of authority than the other websites and It is one that is seen to contain more objective than the other  kind of websites.

Learn more about American Medical Association  from

https://brainly.com/question/1656801

#SPJ1

if you are entering a cell address in to excel for cell f26 and you want to copy the formula that contains this address and have the row and the column stay locked, which of the follow is correct?

Answers

if you are entering a cell address in to excel for cell f26 and you want to copy the formula that contains this address and have the row and the column stay locked and it is Option 2.  F26 .

What is the cell address?

A reference is known to be a term that is used for a cell's address. It is known to be that which tends to identifies a cell or scope  of cells trough the use of  the column letter as well as row number of the cell(s).

Note that for a person to enter a cell address into a formula in Excel, one must:

Make use of cell references in a formulaSelect  the cell in for you want to input the formula.In the formula bar. , input = (equal sign).Then select the cell that has the value you want or type its cell reference and click.

Therefore, if you are entering a cell address in to excel for cell f26 and you want to copy the formula that contains this address and have the row and the column stay locked and it is Option 2.  F26 .

learn more about cell address from

https://brainly.com/question/11683350

#SPJ1

See full question below

Listen If you are entering a cell address in to Excel for cell F26 and you want to copy the formula that contains this address and NOT have the row and the column stay locked, Which of the follow is correct? $F$26 F26 OF$26 O$F26

Electronic hacking and illegal trespassing for the purposes of acquiring a competitor’s proprietary information is considered.

Answers

Answer:

economic espionage.

Explanation:

Anybody know this answer i need help man asap.

Answers

Answer:

b

Explanation:

I think is b because without human labor how can u create a capital or build anything

the dental lab technician is using wax to recreate the tooth’s crown on the portion of the patient’s model that corresponds to the prepared tooth. what is the term given to this piece of the model?

Answers

Based on the above, the term that given to this piece of the model is known to be called Die.

What is the term for an exact replica of a tooth prepared by a laboratory technician?

Die is known to be the term that is used for a replica of the prepared portion of the tooth.

Note that a   dead tooth is one that is cause due to a lot of reason and as such, if  the  tissues of the teeth  are damaged and the blood supply to the tooth is hindered, the tooth can be replaced.

Therefore, Based on the above, the term that given to this piece of the model is known to be called Die.

Learn more about Tooth from

https://brainly.com/question/1378929

#SPJ1

now, it’s time to process the data. as you know, this step involves finding and eliminating errors and inaccuracies that can get in the way of your results. while cleaning the data, you notice there’s missing data in one of the rows. what might you do to fix this problem? select all that apply.

Answers

The thing that a person need to do that might  fix this problem are:

Ask a colleague on your team how they've handled similar issues in the pastAsk you supervisor for guidance.

Check more about errors below.

What are errors in quantitative analysis?

The term error is known to be a word that connote a mistake in a given work. Note that the types of errors in lab measurements are random error, systematic error, and others.

To be able to  remove or correct error, one must have the knowledge of what the error is and when you do not know, it is good you ask others.

Therefore, The thing that a person need to do that might  fix this problem are:

Ask a colleague on your team how they've handled similar issues in the pastAsk you supervisor for guidance.

Learn more about Data Error from

https://brainly.com/question/12600423
#SPJ1

See options below

Sort the spreadsheet so the row with missing data is at the bottom

Ask a colleague on your team how they've handled similar issues in the past

Ask you supervisor for guidance

Delete the row with the missing data point

The File tab on the ribbon opens a new view in the Excel Ul that has access to various options and customization.
What is this area called?
O Ribbon
O Quick Access
Excel options
O Backstage view

Answers

This area is usually referred to as Quick Access. The correct option is B.

What is quick access?

When you open File Explorer, you are presented with the Quick access view, which includes your frequently navigated folders as well as a list of recent files. Additionally, the feature can display the most frequently accessed folders from the left pane.

Quick access is a shortened version of the Quick Access Toolbar found in Microsoft Word, Excel, and other Microsoft Office applications.

The File tab on the ribbon opens a new view in Excel Ul with access to various options and customization, which is commonly known as Quick Access.

Thus, the correct option is B.

For more details regarding quick access, visit:

https://brainly.com/question/23902602

#SPJ2

Answer: Its D

Explanation: NOT B

Which of the following describes a task effectively broken into smaller parts? I. Building a tree house by making a building plan, getting supplies and tools, and creating the base II. Reading a book on programming III. Comparing different walking shoes I only I and II II and III I, II, and III

Answers

The option that best describes a task effectively broken into smaller parts is option I only:

I. Building a tree house by making a building plan, getting supplies and tools, and creating the base.

What is a breakdown task?

A task can be broken down into a hierarchy of connected activities where the work is divided into general and specialized issues.

In project management and systems engineering, a work-breakdown structure is a deliverable-focused division of a project into more manageable parts.

It is an essential project deliverable that tends to share the team's work into digestible chunks is a work breakdown structure. W

Therefore, The option that best describes a task effectively broken into smaller parts is option I only:

I. Building a tree house by making a building plan, getting supplies and tools, and creating the base.

Learn more about Task breakdown from

https://brainly.com/question/14530580
#SPJ1

3. If a computer file will not open, what should you do? (1 poin
A

Answers

Answer:

Not sure what the options are but typically you will restart and if that won't work then check to see if the file is corrupted or not.

Explanation:

1. after you have entered a charge for procedure code 99393, you realize it should have been 99394. what should you do?

Answers

After you have entered a charge for procedure code 99393, edit the procedure in the Transaction Entry dialog box by the following steps:

a. Choose the chart and case numbers for the transaction in the Transaction Entry dialogue box.

b. Track down the fraudulent transaction.

c. Select the action field.

d. Make the required adjustment.

e. Select "Save Transactions" from the menu.

The most common kind of business event for which an accountant would record an accounting entry is a transaction entry. The recording of an invoice to a client, an invoice from a supplier, the receipt of money, and the acquisition of a fixed asset are examples of accounting transactions.

Here are some examples of transactions: paying a supplier for products or services received. purchasing a property that was previously owned by a seller by paying the seller with cash and a note. remuneration for hours worked.

Learn more about transaction:

https://brainly.com/question/28059483

#SPJ4

which of these statements about constructors is false? a. a constructor has no return type b. its name must be the same as the class in which it is defined

Answers

Both the options (a and b) are true that a constructor has no return type and its name must be the same as the name of the class in which it is defined.

In object oriented programming, a constructor is a special type of member function that is called automatically when an object of the class is created. The constructor has no return type and has the same name as that of the class in which it is defined.

This is because:

Constructor is called directly by object initialization code in the runtime, not returning any value, therefore, has no return type.The constructor is primarily used to initialize data members of an object which is an instance of class. So that is why its name must be the same as that of the class.

Therefore, the options (a and b) given in this questions are all true about constructor and there is no false option.

You can learn more about constructor at

https://brainly.com/question/27727622

#SPJ4

Define the following terms:
i) Icon
ii)Desktop

Answers

Icon : an application
Desktop : A computer at a desk

Which format has the largest file size? responses gif, , jpeg, , raw , , png, ,

Answers

A jpeg had the largest file size.

Raw format has the largest file size.

RAW files are uncompressed image files that contain unprocessed data directly from the camera's image sensor.

They retain all the details and information captured by the sensor, resulting in larger file sizes compared to other formats.

This format is commonly used by professional photographers and offers greater flexibility for editing and post-processing.

In some cases, specific JPEG or PNG files can have larger sizes than certain RAW files, especially if they are saved with high quality or contain complex graphics.

To learn more on File size click:

https://brainly.com/question/30506401

#SPJ6

what can be checked on the digital set-top box (stb) to verify the reliability of the customer's drop system?

Answers

The entire drop system need to be checked on the digital set-top box (stb) to verify the reliability of the customer's drop system.

What is STB in set-top box?

A Set Top Box is known to be a kind of a device that gives room for all of its users to be able to watch any video content from any kind of internet video providers through the use of the internet.

It is a term that is often referred to as a Set Top Unit. Note that these said boxes often changes a digital television signal to that of an analog so that one can be able to watch it on a any kind of  television set, or a cable or satellite television.

Therefore, The entire drop system need to be checked on the digital set-top box (stb) to verify the reliability of the customer's drop system.

Learn more about  reliability from

https://brainly.com/question/1265793

#SPJ1

Which digital communication medium consists of top-level posts with threads of response posts?.

Answers

The discussion board consists of top-level posts with threads of response posts.

The discussion board is a kind of conference on any website which allows the users to open the website and register themselves and add conversation topics to the site to which other users of the website can reply. The discussion board helps the users to identify other people's perspectives and gain knowledge through it.

It also provides the benefit that the users viewing and responding to any forum can be monitored and can be controlled thus limiting the top-level posts and response posts to only the specified users.

Discussion boards help you to understand the user's objectives and hence improve your marketing as you are in direct contact with the users.

To learn more about discussion boards, click here:

https://brainly.com/question/2506723

#SPJ4

In the String literal “Hello world”, at what index is the character “H”?

A. -1
B. 1
C. 0
D. 2

Question 2: In the string literal “Dinosaurs are cool” at which index is the character “c”

A. 13
B. 14
C. 15
D. 12

Answers

Answer: 1.A 2.D

Explanation:

I hope this help you

which installation method often requires you to immediately install updates from the internet after installation is complete?

Answers

An installation method which often requires an end user to immediately install updates from the Internet after installation is complete is: CD or DVD installation.

What is a software?

A software can be defined as a set of executable instructions that is typically used to instruct a computer system on how to perform a specific task and proffer solutions to a particular problem.

What is an installation?

An installation can be defined as a process through which a software application is configured and integrated into the memory of a computer system, in order to make it ready for execution of specific task.

In Computer technology, an installation method which often requires an end user to immediately install updates from the Internet after installation is complete is CD or DVD installation.

Read more on software installation here: https://brainly.com/question/22529307

#SPJ1

Complete Question:

Which installation method often requires you to immediately install updates from the Internet after installation is complete?

answer choices

Internet installation

App Store installation

Software subscription

CD or DVD installation

Other Questions
A student cuts a cube perpendicular to its bases. What two dimensional cross section could result from the student slicing the cube perpendicular to its bases fill in the reflexive pronouns in the following chart. yo- nosotros, tu-, el/ella- ellos/ellas why was the Spanish mission to convert native Americans to Christianity ultimately unsuccessful solve for n. n/-5= 7 The GCF of 15 and 27 is _____. Numerical Answers Expected! Answer for Blank 1: What number can you add to 7 to get a sum of zero Why is Spain able to cover the flu in their media? Which functions are decreasing?Select all answers that are correct. apply chargaffs decide how many guanine bases and length of DNA will have if it has 26 cytosine bases. explain. 8. Complete the statement using , or =.a. 21-51b. -5__ _|9||5|_________|-5|d. |1|___________|8|C. What is the emergency fund? in the story, things they carried In the compound microscope, If you see bacteria move to the right,this bacteria on the slide, really move to:O a. Leftb. Downwardonc. UpwardO d. RightClear my choice A computer salesman makes $10 per hour and 0.5% commission on what he sales. If he works for 40 hours this week, and he sales $4,500 of computers, how much will he make total? The longest leg of a right triangle is 12 inches. The hypotenuse is 3 inches longer then twice the shortest leg. How long is the shortest leg and the hypotenuse of the triangle. Sally wants to determine her TDEE so that she can figure out what her estimated caloric intake should be. She wants to calculate her RMR first.What information does she need in order to calculate this value?(Select all that apply.)physical activity levelheightageweight How many grams of oxygen (O) are present in 0.0207 moles of Ca(HCO 3) 2 differentiate between acidic salt and basic salt. yall got any game ideas? i aint got tha energy to be doin school work, tell em to me :) Students in school - how do we pay taxes? Get a job? Raise children?Schools- solve for xPlz help me With number 8 dont get it thx How are goods different from services?A)Demand influences a goods cost.B)Goods are scarceC)Goods are manufactured.D)Labor produces goods.