Computer Science, asked by babumoolanchalakudy, 10 months ago

5. Write a class with the name volume using

function overloading that computes the volume

of a cube,a sphere and a cuboid.(using

inputstream reader)

Formula:volume of a cube(vc)=s*s*s

Volume of a sphere(vs)= 4/3 *22/7 *r*r*r

Volume of a cuboid(vcd)=l*b*h (7)​

Answers

Answered by Amitgoswami9667
3

Explanation:

  1. Java Program
  2. public class cube{
  3. public static void main(String args[])

int a=4;

int volume=a*a*a;System.out.println("Volume ot the cube="+volume);

Similar questions