C++ Program to illustrate the working of objects and class