Question: Create a class Shape which performs the following. a. Provide a method areaCircle which takes one parameter radius as double, calculates 03 Marks and
Create a class Shape which performs the following. a. Provide a method areaCircle which takes one parameter radius as double, calculates 03 Marks and returns the area of the circle as double. [Formula: Area=Tr] b. Provide a method circumCircle which takes one parameter radius as double, calculates and returns the circumference of the circle as double. [Formula: 03 Marks Circumference=2Tr] c. Provide a method sphereSurfaceArea which takes one parameter radius as double, calculates and returns the surface area of the sphere as double. [Formula: Surface 03 Marks Area=4r] d. Provide a method sphereVolume which takes one parameter radius as double, calculates and returns the volume of the sphere as double. [Formula: 03 Marks Volume=4/3Tr]
Step by Step Solution
3.47 Rating (150 Votes )
There are 3 Steps involved in it
Answer CODE JAVA PROGRAMMING LANGUAGE import javautil class Shape Method to find areaCircle public s... View full answer
Get step-by-step solutions from verified subject matter experts
