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
Whenever I go onto Google Chrome, the words are in Spanish! How can I make the words be back in English again? Please let me kno
ivann1987 [24]

Answer:

Go to google setting look up english on setting bar and it should have the option to change or add languages make sure you press save when choosing english

Explanation:

5 0
3 years ago
You have double-clicked a device in Device Manager to open its Properties window. Where can you find information about IRQs the
Setler [38]

To find information about IRQs the device might use, make alteration to the View menu option and then change it to Resources by type.

<h3>How do one find information about IRQs?</h3>

The best way to see IRQ information in Windows is through the use of Device Manager.

Note that for one to be able to find information about IRQs the device might use, one has to makes some changes to the View menu option and then one can change it to Resources by type to be able to see the Interrupt request (IRQ) part.

Learn more about Device Manager from

brainly.com/question/869693

#SJ1

7 0
2 years ago
Suppose your name was George Gershwin. Write a complete program that would print your last name, followed by a comma, followed b
NNADVOKAT [17]

Answer:

I will write the code in C++ and JAVA      

Explanation:

<h2>JAVA CODE</h2>

public class Main

{ public static void main(String[] args) {

       // displays Gershwin,George

     System.out.println("Gershwin,George"); }  }

<h2>C++ Code:</h2>

#include <iostream>

using namespace std;  

int main()

{  cout<<"Gershwin,George"; }    

// displays last name Gershwin followed by , followed by first name George

//displays Gershwin,George as output.

6 0
4 years ago
Read 2 more answers
Which of these is an effective color scheme? A. red text on black background B. red text on red background C. yellow text on bl
Natasha2012 [34]
Effectively, Yellow text on a black background would show up the best.
The contrast of the bright and dark would be the best for people to see.

Hope this helps!

3 0
3 years ago
Read 2 more answers
A bin contains 100 sty le a notebooks, 100 style b notebooks, and 100 style c notebooks. antoine will select 3 notebooks from th
emmasim [6.3K]
<span>The answer is Ten.  Substituting numbers for letters, available selections are 111, 112, 113, 122, 123, 133, 222, 223, 233, 333.  Note that, for example, 112, 121, and 211 are considered as the same selection.
</span>AAA, BBB, CCC, <span>AAB, AAC, </span><span>BBC, </span><span>ABB, ACC, </span><span>CCB & ABC.</span>
7 0
4 years ago
Other questions:
  • The ____ shortcut keys remove character formatting. (points : 2) ctrl 0 (zero) ctrl i ctrl spacebar ctrl u
    8·2 answers
  • Consider the following list.
    5·1 answer
  • Create a cell array containing the same data as above (Do not use built-in functions such as cell2array, struct2cell, etc. but u
    9·1 answer
  • How do you think engel would feel about computers information systems and the internet?
    14·2 answers
  • What is the promotion and advertising stage of a product or service called?
    15·1 answer
  • How do I write the yearly salary for something without copying it word for word? I'm doing a PowerPoint ( which you had to choos
    15·1 answer
  • MyProgramming Lab
    12·1 answer
  • Can I get the code for the Edhesive Assignment 3 Chatbox in python? Thanks.
    15·1 answer
  • What is extraction, transformation, and loading? Group of answer choices It is a process of entering data, tracking data, and lo
    5·1 answer
  • What's the best definition of financial literacy?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!