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
i double volume double : with radius as an argument, returns the volume of sphere using the formula.
ii double volume double double with height and radius as the arguments returns the volume of a cylinder using the formula.
iii double volume double I, double double : with length breadthband height as the arguments, returns the volume of a cuboid using the formula,
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
