Question: 10.Modify the following code to generate the given output. Do not modify the main function. 1. #include 2. using namespace std; 4. class box 6.

 10.Modify the following code to generate the given output. Do not

10.Modify the following code to generate the given output. Do not modify the main function. 1. #include 2. using namespace std; 4. class box 6. public: // Constructor definition box (double 1 2.9, double b 2.9, double h 2.0) 9 10 length 1; breadth-b height -h; 12 13. 14. double volume() 15 16. 17. private: 18 19 20 21. 22. 23. int main(void) ( 24 25 26. 27 28 29 return length * breadth * height; ) double length // Length of a box double breadth; /I Breadth of a box double height; // Height of a box box Box1 (3.3, 1.2, 1.5); /Declare boxd box Box2 (8.5, 6.0, 2.0); //Declare box2 return Output: Number of box objects created so far: 1 Number of box objects created so far: 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!