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
3
Explanation:
- Java Program
- public class cube{
- public static void main(String args[])
int a=4;
int volume=a*a*a;System.out.println("Volume ot the cube="+volume);
Similar questions
Sociology,
4 months ago
India Languages,
4 months ago
Computer Science,
4 months ago
Hindi,
10 months ago
English,
10 months ago
Science,
1 year ago
English,
1 year ago
Physics,
1 year ago