Updated output comment location for improved readability.

Reading the output before reading the line that would result in such output seemed to interrupt the flow of reading.
This commit is contained in:
Ian Dinwoodie
2019-05-19 17:54:39 -04:00
parent d82d783495
commit 040aedb6ce
7 changed files with 46 additions and 36 deletions

View File

@@ -46,18 +46,18 @@ int main()
// Make a door with dimensions 100x200.
std::shared_ptr<Door> door = DoorFactory::makeDoor(100, 200);
// Output: width = 100
std::cout << "width = " << door->getWidth() << std::endl;
// Output: height = 200
// Output: width = 100
std::cout << "height = " << door->getHeight() << std::endl;
// Output: height = 200
// We can use the factory again to make a door with dimensions 50x100.
std::shared_ptr<Door> door2 = DoorFactory::makeDoor(50, 100);
// Output: width = 50
std::cout << "width = " << door2->getWidth() << std::endl;
// Output: height = 100
// Output: width = 50
std::cout << "height = " << door2->getHeight() << std::endl;
// Output: height = 100
return 0;
}