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
harina [27]
3 years ago
6

Create a class called Circle, which has (i) an attribute radius, (ii) a method that returns the current radius of a circle objec

t, (iii) a method that allows the user to reset the radius of a circle, (iv) a method that calculates the area of the circle, and (v) a constructor that takes a number as parameter input and assign the number as the initial value of radius.
Computers and Technology
1 answer:
nadya68 [22]3 years ago
8 0

Answer:

Explanation:

The following class is written in Java. I created the entire Circle class with each of the methods and constructor as requested. I also created a tester class to create a circle object and call some of the methods. The output can be seen in the attached picture below for the tester class.

class Circle {

   double radius;

   public Circle(double radius) {

       this.radius = radius;

   }

   public double getRadius() {

       return radius;

   }

   public void resetRadius() {

       radius = 0;

   }

   public double calculateArea() {

       double square = Math.pow((Math.PI * radius), 2);

       return square;

   }

}

You might be interested in
____ technology is the same as that used in digital watches, or the time display on a microwave oven
erma4kov [3.2K]
Digital technology is the same as the used in digital watches, or the time display on a microwave oven. Digital is about using the exact numbers to tell the time. By being digital transmission of data became easy. Sound, images and document are relayed faster and stored conveniently through this system.
4 0
3 years ago
Stores of data that are so vast that conventional database management systems cannot handle them, and very sophisticated analysi
rjkz [21]

Answer:

Big Data

Explanation:

none

3 0
3 years ago
Software that people commonly use in the workplace to make their lives easier is called
Lorico [155]
Software that people commonly use in the workplace to make their lives easier is called system software.
4 0
3 years ago
after installing a secondary hard drive what needs to be done to the hard drive and what do these two task do?
gladu [14]
Keep the first hard drive then override it insert the second one and memory goes into the second one
8 0
3 years ago
Which of the following do you need to remeber about true/false questions?
lina2011 [118]
All parts of a statement must be true for it to be true
7 0
3 years ago
Other questions:
  • A technician is talking to end users about the specifications for an upgraded application server. The users of the application r
    11·1 answer
  • The Internet began when a large company wanted to sell products online. <br> True or flase?
    6·2 answers
  • Word documents contain how many sections by default?
    9·1 answer
  • These data provides the responses of 10 students in class A and in class B who were asked how many hours they slept lastThese da
    6·1 answer
  • Graphic software task​
    7·1 answer
  • Does digital media play a big role in your life?
    13·1 answer
  • Lucia is using the American Psychological Association (APA) style guidelines to writer her research paper. What is her most like
    5·2 answers
  • You manage a network that uses switches. In the lobby of your building, there are three RJ45 ports connected to a switch. You wa
    5·1 answer
  • Which panel is used to make a website​
    8·1 answer
  • What is the value of x after running this code?
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!