Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Box {
- public:
- Box(double l = 2.0, double b = 2.0, double h = 2.0) {
- cout <<"Constructor called." << endl;
- length = l;
- breadth = b;
- height = h;
- }
- double Volume() {
- return length * breadth * height;
- }
- private:
- double length;
- double breadth;
- double height;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement