CSE201 Lab 2

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment

Description

5/5 - (7 votes)

Create a class named ‘Box’ with three data members- length, breadth and height and a
method to calculate the volume which is ‘length*breadth*height’. The class has three
constructors which are :
1 – Having no parameter – values of both length, breadth and height are assigned zero.
2 – Having three numbers as parameters – the three numbers are assigned as length,
breadth and height respectively.
3 – Having one number as parameter – all length, breadth and height are assigned that
number.
Now, create objects of the ‘Box’ class having none, one and three parameters and print
their volume.