#include class Fraction { public: void SetNumerator(int n); void SetDenominator(int d); double ToDecimal(); private: void PrintHello(); int numer; int denom; }; void Fraction::SetNumerator(int n) { numer = n; /* notice we are accessing private member numer here. */ } void Fraction::SetDenominator(int d) { if(d != 0) denom = d; else denom = 1; } double Fraction::ToDecimal() { PrintHello(); return (double) numer / denom; /* integer division */ } void Fraction::PrintHello() { std::cout<<"Hello!!!"<