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

Method Box

Examples/NoModules/Chapter 12/Ex12_01/Ex12_01.cpp:9–15  ·  view source on GitHub ↗

Constructor

Source from the content-addressed store, hash-verified

7public:
8 // Constructor
9 Box(double length, double width, double height)
10 {
11 std::cout << "Box constructor called." << std::endl;
12 m_length = length;
13 m_width = width;
14 m_height = height;
15 }
16
17 // Function to calculate the volume of a box
18 double volume()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected