design a class to overlord a method volume() to find : volume of sphere, volume of cuboid. write a main method to call all three method.
Answers
Answered by
0
Answer:
Explanation:Write a class with the name volume using function overloading that computes the volume of a cube, a sphere and a cuboid. Formula volume of a cube (vc) = s*s*s volume of a sphere (vs) = 4/3* π* r* r*r (where π = 3.14 or 22/7) Volume of a cuboid (vcd) = l* b* h Read more on Sarthaks.com - https://www.sarthaks.com/840996/write-class-with-name-volume-using-function-overloading-that-computes-volume-sphere-cuboid
Similar questions