1.

Create a class cuboid with three attributes l, b, h to calculate the volume of cuboid. Define no argument, parameterized constructors for the cuboid. Define 1 parameter, 3 parameter constructors?

Answer»

Cuboid is a 3-dimensional box-like FIGURE represented in the 3-dimensional plane.Cuboid has 6 rectangled-shape faces. Each face meet another face at 90 degree each.Three sides of cuboid meet at same vertex.Since it is made up of 6 RECTANGLE faces, it have LENGTH, width and height of different dimension. cuboid Examples : Input : 2 3 4 OUTPUT : Area = 24         Total Surface Area = 52     Input : 5 6 12 Output : Area = 360         Total Surface Area = 324Explanation:



Discussion

No Comment Found