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

@@ -99,10 +99,10 @@ int main()
About about(darkTheme);
Careers careers(darkTheme);
// Output: About page in dark palette
std::cout << about.getContent() << std::endl;
// Output: Careers page in dark palette
// Output: About page in dark palette
std::cout << careers.getContent() << std::endl;
// Output: Careers page in dark palette
return 0;
}

View File

@@ -92,28 +92,28 @@ class VanillaCoffee : public Coffee
int main()
{
std::shared_ptr<Coffee> simple = std::make_shared<SimpleCoffee>();
// Output: 3
std::cout << simple->getPrice() << std::endl;
// Output: Simple coffee
// Output: 3
std::cout << simple->getDescription() << std::endl;
// Output: Simple coffee
std::shared_ptr<Coffee> milk = std::make_shared<MilkCoffee>(simple);
// Output: 3.5
std::cout << milk->getPrice() << std::endl;
// Output: Simple coffee, milk
// Output: 3.5
std::cout << milk->getDescription() << std::endl;
// Output: Simple coffee, milk
std::shared_ptr<Coffee> whip = std::make_shared<WhipCoffee>(milk);
// Output: 5.5
std::cout << whip->getPrice() << std::endl;
// Output: Simple coffee, milk, whip
// Output: 5.5
std::cout << whip->getDescription() << std::endl;
// Output: Simple coffee, milk, whip
std::shared_ptr<Coffee> vanilla = std::make_shared<VanillaCoffee>(whip);
// Output: 6.5
std::cout << vanilla->getPrice() << std::endl;
// Output: Simple coffee, milk, whip, vanilla
// Output: 6.5
std::cout << vanilla->getDescription() << std::endl;
// Output: Simple coffee, milk, whip, vanilla
return 0;
}

View File

@@ -59,16 +59,16 @@ int main()
std::shared_ptr<Computer> computer = std::make_shared<Computer>();
ComputerFacade facade(computer);
facade.turnOn();
// Output:
// Beep!
// Loading...
// Ready to use!
facade.turnOn();
facade.turnOff();
// Output:
// Closing all programs!
// Zzz
facade.turnOff();
return 0;
}

View File

@@ -83,6 +83,11 @@ int main()
// Serve the customers.
shop.serve();
// Output: (Note: Since the map is unordered, the serving order may vary.)
// Serving tea to table 4
// Serving tea to table 5
// Serving tea to table 1
// Serving tea to table 2
return 0;
}