-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.cpp
More file actions
36 lines (30 loc) · 702 Bytes
/
Copy pathcode.cpp
File metadata and controls
36 lines (30 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<iostream>
#include "Box.h"
#include "Box.cpp"
// Main function for the program
int main() {
Box box1;
Box box2;
Box box3;
double volume = 0.0;
//box 1 specification
box1.SetLength(6.0);
box1.SetBreadth(7.0);
box1.SetHeight(5.0);
// box 2 specification
box2.SetLength(12.0);
box2.SetBreadth (13.0);
box2.SetHeight(10.0);
// volume of box 1
volume = box1.GetVolume();
cout << "Volume of Box1 : " << volume <<endl;
// volume of box 2
volume = box2.GetVolume();
cout << "Volume of Box2 :" << volume <<endl;
// Add two object as follows:
//box3 = box1 + box2;
// volume of box 3
volume = box3.GetVolume();
cout << "Volume of Box3 : " << volume <<endl;
return 0;
}