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
The art element line is a moving point.<br><br><br> True or False
sergeinik [125]
I’m pretty sure the answer is true
3 0
3 years ago
What are the steps to configure user information in a document?
chubhunter [2.5K]

Answer:

file, properties, options, general

Explanation:

4 0
3 years ago
Read 2 more answers
Create a simple program of your own using a Loop that counts and displays numbers 1-10.
avanturin [10]

Answer:

I think

Explanation:

you....

8 0
3 years ago
Other than technology and start-up costs what are two
sattari [20]
The other two particular cases of hindrances that could keep an organization or individual from entering a market are the beneath: 
Individual attributes - there are sure occupations that specific criminals are not permitted to do - sex wrongdoers can't start up youngster mind offices; individuals with associations with composed wrongdoing shouldn't have the capacity to begin gambling clubs, and so on. There are employments that outsiders can't do. Furthermore, for a few employments, you require unique trusted status. 
Local legal restricti - you can't simply begin a taxicab organization in New York, you need to have emblems for your taxis. It is practically difficult to get one from the city, so you regularly need to purchase another person out
6 0
3 years ago
_______ consists of the programs that control or maintain the operations of the computer and its devices.
Jet001 [13]
The system software consists of the programs that control or maintain the operations of the computer and its devices.
7 0
3 years ago
Other questions:
  • Research information technology affects on job market, career pathways, occupational outlooks in business and finance and synthe
    7·1 answer
  • The option to add the date and time to a document is located in the
    9·2 answers
  • Assume we perform a known-plaintext attack against DES with one pair of plaintext and ciphertext. How many keys do we have to te
    14·1 answer
  • True/False
    15·1 answer
  • Polymorphism means ______________.
    15·2 answers
  • What are wizard ranks in brainly​
    13·2 answers
  • Help pweaseee!! Lloyd has created a validation script for a data entry form. What property should he use to test for a selected
    10·1 answer
  • The different languages that follow specific RULES. These languages use commands
    9·1 answer
  • You’ve been hired to help a bank automate their deposit/withdrawal system! Your task is to write a Python program that interacts
    6·1 answer
  • What is output by the following code?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!