sample C++ class with constructor, private members and public method