Question: Design a class to overload a function volume ( ) as follows [ 8 ] ( i ) double volume ( double r ) :

Design a class to overload a function volume() as follows
[8]
(i) double volume (double r): with radius as an argument, returns the volume of sphere using the formula. V=43***227**r***r***r
(ii) double volume (double h, double r) with height(h) and radius (r) as the arguments returns the volume of a cylinder using the formula. V=227***r***r***h
(iii) double volume ( double I, double b, double h): with length (), breadth(b)and height (h) as the arguments, returns the volume of a cuboid using the formula, V=|**b**h|||
Design a class to overload a function volume ( )

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!