Need help not sure how do this Do an analysis of the following program: Write a program to input the dimension of a cylinder, and print the surface area and volume.

2 answers

I'm sure you can do the I/O. The calculation is

v = Math.PI * r*r * h
a = 2*Math.PI * r * (r+h)

or, for r-squared, there's always Math.pow(r,2)
The whole thing has to be do an OOD analysis of the following write a program to input the dimension of cylinder, and print the surface area and volume. What you show me don't think it the right one.