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
Lunna [17]
3 years ago
7

Create a class named Circle with fields named radius, diameter, and area. Include a constructor that sets the radius to 1 and ca

lculates the other two values. Also include methods named setRadius() and getRadius(). The setRadius() method not only sets the radius, but it also calculates the other two values. (The diameter of a circle is twice the radius, and the area of a circle is pi multiplied by the square of the radius. Use the Math class PI constant for this calculation.) Save the class as Circle.java.
Computers and Technology
1 answer:
REY [17]3 years ago
6 0

Answer:

The code for this class is shown in the explanation section

Explanation:

public class Circle {

   private double radius;

   private double diameter;

   private double area;

   public Circle(double radius, double diameter, double area) {

       this.radius = 1;

       this.diameter = diameter;

       this.area = area;

   }

   public void setRadius(double radius) {

       this.radius = radius;

       diameter = radius*2;

       area= Math.PI*(radius*radius);

   }

   public double getRadius() {

       return radius;

   }

}

You might be interested in
A student has a ten-year-old desktop computer that she only uses for word processing, but she would like to start using it to pl
wariber [46]

Answer:

She should buy a new one or buy a Gaming PC to upgrade the setup.

Explanation:

6 0
3 years ago
Which of the following are ways a vote thief could cast multiple votes in an online election? (check all that apply)
saveliy_v [14]

Answer:

All of the given options apply and are correct.          

Explanation:

a) The first option is correct because the intruder can use denial-of-service attack and by flooding the site with traffic to get the voter server unavailable. Then he can direct the voters to a fraud vote server.

b) The second options correctly applies too because the thief also buys the pass codes from the people who want to sell their right to vote and this way the thief can purchase multiple pass code and cast multiple votes.

c) The hackers can set up fake vote servers and then direct the voters to these servers or websites in order to collect pass codes of voters. These pass codes can then be misused by the thief to cast multiple votes in an online election.

d) Social engineering techniques can also be used to get pass codes from certain voters. By manipulating the targeted voters psychologically they can get their pass codes to cast multiple votes illegally.

3 0
3 years ago
GDP measures the production levels of any nation. This implies a correlation between production levels and ____________.
loris [4]
<span>C. Average Income ih ope this helps

</span>
4 0
3 years ago
7 Annie must pay in taxes to the state<br> government on her investment.
svetoff [14.1K]

Answer:

is that the question?

Explanation:

6 0
3 years ago
Read 2 more answers
What is the outcome of using a string literal in a Python print statement?
Nikolay [14]
<h2>D Strings will be translated into program code </h2><h2 />
8 0
3 years ago
Other questions:
  • The ____ section of the project plan should describe the major project functions and activities and identify those individuals w
    7·1 answer
  • How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
    9·1 answer
  • Software that interprets commands from the keyboard and mouse is also known as the what?
    6·2 answers
  • What is the output of the following query? SELECT INSERT ('Knowledgeable', 5, 6, 'SUPER');
    11·1 answer
  • If I have 103.5% in my grade and if I got a 0/100 on a test, what do I have now in my grade?
    6·2 answers
  • All of the following are examples of extracurricular activities except:
    5·2 answers
  • What effect does social media have on teens?
    10·2 answers
  • Which function can be used to insert the current date into a spreadsheet?
    9·1 answer
  • ProgrammingAssignment3
    8·1 answer
  • 1.Know the BMI of the user. First, the user will input the height in meters and weight in kilograms. After inputting, the inputt
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!