The problem is to design a class named Box whose dimensions are integers and private to the class. We need to create 4 functions and overload 2 operators for the class Box. Since the template is given, so it is very easy to finish it.
Part 2-Code
box.hpp
Part 3-Result & Verification
Test case #1
Test.cpp
Test case #2
Test.cpp
Part 4-Difficulties & Solutions
1.Since the Volume may exceed the range of int, so we need to use long long.
2.We need to set l,b,h private and set other function as public.
3.When we need to overload operator, we just need to overload it in normal way.

![[Solved] CS205 Assignment 6- class named Box](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] CS205 Assignment 1-basic input/output](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.