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
valentina_108 [34]
3 years ago
4

Write code which takes a double input from the user and creates a circle with that radius. The code should calculate the area of

the circle, then double the radius of the circle and print the new area of the circle. Sample run: Enter radius: > 2.0 Area: 12.566370614359172 Radius is being doubled... Area: 50.26548245743669
Computers and Technology
1 answer:
Gnom [1K]3 years ago
6 0

Answer:import java.util.Scanner;

import (*software used for shapes*);

public class (*enter class name*){

 public static void main(String[] args){

 

   Scanner scan = new Scanner(System.in);

   System.out.println("Enter radius: ");

   double r = scan.nextDouble();  

   Circle c = new Circle(r);

   double area = c.getArea();  

   System.out.println("Area: "+area);

   System.out.println("Radius is being doubled...");  

   r = c.getRadius();  

   c.setRadius(r*2);

   area = c.getArea();

   System.out.println("Area: "+area);

 

Explanation:

I know this is late, but I am putting this here for future people trying to solve this problem.

You might be interested in
What is the name given to the software testing technique, which basically consists of finding implementation bugs using malforme
cupoosta [38]

Answer:

Fuzz testing

Explanation:

Fuzz testing technique was developed by Professor Barton Miller and his students in the year 1989 at the University of Wisconsin Madison. This Fuzz testing technique is used in finding implementation bugs using malformed/semi-malformed data injection in an automated fashion.

6 0
4 years ago
Read 2 more answers
HURRY HELP THIS IS FOR CODING !!!! What are some real-life situations that require a program that is iterative? Include at least
Degger [83]

Answer:

A health service, a sales service, a social network, all because they require you to make a request to return a result

5 0
3 years ago
Read 2 more answers
How do you italicise, bold, letters on this app?​
maks197457 [2]

Answer:

You cant on the app

Explanation:

You cannot make your text bold, <em>italic, </em><u>or underlined</u> on the Brainly App. You can only do so on the brainly.com website

5 0
3 years ago
Read 2 more answers
. Service recovery refers to A. the ability to quickly restore service following a service failure and provide compensation. B.
san4es73 [151]

Answer:

A. the ability to quickly restore service following a service failure and provide compensation.

Explanation:

Systems like servers are bound to fail at some point. This is because, it either has running parts or electronic components that could overheat or get shorted due to external or internal malfunction.

The ability of system to quickly restore services and operation after it experiences a total system failure is called system recovery.

7 0
3 years ago
Which of the following is NOT a major feature of safety and health programs? A. Assess cultural costs B. Hazard prevention and c
aleksandrvk [35]
A. assess cultural costs. they wont help anyone if they have a safety or health issue. hope this helped

8 0
3 years ago
Other questions:
  • In database systems, the dbms enforces rules about which user can perform which action when. The rules are known as ________.
    10·1 answer
  • What company handles security for a lot of the e-commerce on the internet and also maintains two root name server clusters?
    8·1 answer
  • 125 • 12² what is the answer?<br>- 124​
    6·1 answer
  • A(n) ________ signal is a discrete, binary waveform that transmits data coded into two discrete states such as 1-bits and 0-bits
    12·1 answer
  • Assume v is a vector of integers that has been declared and initialized. Write a statement that adds the value 42 to the vector.
    14·1 answer
  • Describe the functions of ALU, resisters, CU, BIU, Cache and FPU.
    7·1 answer
  • Write a Java program that generates a new string by concatenating the reversed substrings of even indexes and odd indexes separa
    5·1 answer
  • You would use the _______ conditional formatting options when analyzing a worksheet in which you want to highlight the highest o
    13·1 answer
  • Explain four sitting postures in a computer laboratory​
    9·1 answer
  • Josh is learning about hackers know for finding loopholes in systems, without notifying the company or organization beforehand.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!