MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / setHeight

Method setHeight

Examples/NoModules/Chapter 20/Ex20_08/Box.h:19–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 void setLength(double length) { if (length > 0) m_length = length; }
18 void setWidth(double width) { if (width > 0) m_width = width; }
19 void setHeight(double height) { if (height > 0) m_height = height; }
20
21 // Function to calculate the volume of a box
22 double volume() const { return m_length * m_width * m_height; }

Callers 4

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected