Write program that displays the area (size of the surface) and perimeter (the distance around) of a circle that has a radius of 5.5:
perimeter = 2 * radius * p area = radius * radius * p
Breaking it down
To make the program more reusable and modular we will define two methods named calculateArea and calculatePerimeter. If the program was capturing user input we could pass a parameter to the method to calculate the values. Next from the main method we will call the method and set it to a local variable. Finally we will print the calculations to the console.