klips/cpp/patterns/bridge/abstraction.cpp

11 lines
305 B
C++
Raw Permalink Normal View History

2021-05-11 20:03:03 +00:00
#include "abstraction.hpp"
int VerboseCalculator::doMath(const int &a, const int &b) const
{
int result = method->math(a, b);
std::cout << "Performing " << method->getName() << " on input: a = " << a
<< ", b = " << b << std::endl << "Result: " << result << std::endl;
return result;
}