Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Answer CODE JAVA PROGRAMMING LANGUAGE import javautil class Shape Method to find areaCircle public s... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Guide To Java A Concise Introduction To Programming

Authors: James T. Streib, Takako Soma

2nd Edition

3031228413, 978-3031228414

More Books

Students also viewed these Programming questions