part A
create a method called AreaCircle
It would look like this
public static double AreaCircle(double radii)
inside it would process something like this.
final double pi = 3.142;
double area = pi * radii * radii;
return area;
And finally u can sys.out.println(area); in your main method.
part B, this one call it say, VolumeCone. same as above, except u
need to create another double value called height.
it would look something like this.
public static double VolumeCone(double radii, double height)
same thing
final double pi = 3.142;
double volume = pi * radii * radii * height * (1/3);
and then return volume.
part C, would be ur main method.
so in ur main method, u just call all the mthod n run lor.
i. Circle1 with radius = 3 cm ----> AreaCircle(3)
ii. Cone1 with radius = 1 cm and height = 4 cm ---->
VolumeCone(1,4)
Iii. Circle2 with radius = 4.5 cm ----> AreaCircle(4.5)
iv. Cone2 with radius = 0.5 cm and height = 2 cm ---->
VolumeCone(0.5,
Oh any u need to create a double variable for each of the circle
and cone.
Eg double circle1 = AreaCircle(3);
correct me if im wrong.