Create class named Cuboid with fields length,width and height. Calculate volume of the cuboid.
Class Cuboid contains following functions:
1. set_height(int l): sets the length of the cuboid.
2. set_width(int w): sets width of the cuboid.
3. set_height(int h): sets height of the cuboid.
4.volume(): Prints the volume of the cuboid.
The first line contains an integer T, the number of test cases. For each test case, three integers are given.
For each test case, the output is the volume of the cuboid.
Since this is a functional problem you don't have to worry about input, you just have to complete the functions given set_height(), set_width(), set_height() and volume().
1 <= T <= 100
1 <= l, w, h <= 103
10 5 7
11 9 4
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.