Write a program to move and calculate the area and


Question 1: Write a program to move and calculate the area and circumference of a circle.

The program should read from the screen the information of a circle, which contains:

1. the location of a circle indicated by three integers, i.e.
x- and y-coordinates of the center, and radius.

2. an integer indicating the moving distance in the horizontal direction.
Positive number means moving right, otherwise moving left.

3. an integer indicating the moving distance in the vertical direction.
Positive number means moving down, otherwise moving up.

For example, suppose we read the following 5 intergers from the screen:
20 10 40 9 -7
So the location of the center is (20, 10), and radius is 40. The circle should be moved 9 units to the right and 7 units up.

You are required to declare and define the subsequent "void" functions,

1. moveCircle function, which passes coordinates of the center by reference, and the moving distances on horizontal and vertical directions by value.

2. Calculate function, which passes the radius by value, and get back the area (PI*radius*radius) and circumference (2*PI*radius) of the circle through reference

Describe each and every question in depth with examples and prepare this application in java programming.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Write a program to move and calculate the area and
Reference No:- TGS0947770

Expected delivery within 24 Hours