You are splitting data from views of that data. You will have a class that stores a number. You will then have 4 other classes that present different views of an object of the data class. So in these view classes store an object of the data class and have a view method that prints the data in the required format. Use the public interface of the stored object to feed its value to the view class.
Code:
class data
{
int num;
public:
int getnum() const
{ return num;}
};
class octalview
{
data obj;
public:
void view() const
{ std::cout<<std::oct<<obj.getnum();}
};
or similar....