Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ getWeight
Method
getWeight
Examples/NoModules/Chapter 14/Ex14_07A/Carton.h:45–49 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
43
}
44
45
double getWeight() const
46
{
47
return 2.0 * (m_length * m_width + m_width * m_height + m_height * m_length)
48
* m_thickness * m_density;
49
}
50
51
private:
52
std::string m_material {
"Cardboard"
};
Callers
1
main
Function · 0.45
Calls
no outgoing calls
Tested by
no test coverage detected