friend function to calculate the surface area of a Box object
| 21 | |
| 22 | // friend function to calculate the surface area of a Box object |
| 23 | double surfaceArea(const Box& box) |
| 24 | { |
| 25 | return 2.0 * (box.m_length * box.m_width |
| 26 | + box.m_length * box.m_height + box.m_height * box.m_width); |
| 27 | } |